diff options
author | Vladimír Čunát <vladimir.cunat@nic.cz> | 2016-12-22 10:23:20 +0100 |
---|---|---|
committer | Vladimír Čunát <vladimir.cunat@nic.cz> | 2016-12-22 10:23:20 +0100 |
commit | bb21450f9024bfb7b4f32e9099552fed7bcd4181 (patch) | |
tree | fa49da2bceeb5c0fdebc31b889c02ea4fb2d4fd6 /contrib/ucw | |
parent | Merge !105: modules/http: fix mixed up argument error in websocket code (diff) | |
download | knot-resolver-bb21450f9024bfb7b4f32e9099552fed7bcd4181.tar.xz knot-resolver-bb21450f9024bfb7b4f32e9099552fed7bcd4181.zip |
uint: typedef globally but not more than once
Before C11, repeating a typedef is forbidden, if taken strictly, and
some compiler versions even reject it. On the other hand lru.h was
missing it, which wasn't noticed due to glibc's <sys/types.h> defining it.
Fixes https://gitlab.labs.nic.cz/knot/resolver/issues/114.
Diffstat (limited to 'contrib/ucw')
-rw-r--r-- | contrib/ucw/config.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/ucw/config.h b/contrib/ucw/config.h index 11234f56..5d3cb4fe 100644 --- a/contrib/ucw/config.h +++ b/contrib/ucw/config.h @@ -38,7 +38,12 @@ typedef int32_t s32; /** Exactly 32 bits, signed **/ typedef uint64_t u64; /** Exactly 64 bits, unsigned **/ typedef int64_t s64; /** Exactly 64 bits, signed **/ + +#ifndef uint /* Redefining typedef is a C11 feature. */ typedef unsigned int uint; /** A better pronounceable alias for `unsigned int` **/ +#define uint uint +#endif + typedef s64 timestamp_t; /** Milliseconds since an unknown epoch **/ // FIXME: This should be removed soon |