diff options
author | SODA Noriyuki <soda@NetBSD.org> | 2017-05-25 08:49:42 +0300 |
---|---|---|
committer | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2017-07-01 09:44:36 +0300 |
commit | c93f0b4401de582685f9237a832fa6b3716cfe2a (patch) | |
tree | b2e6dd60cec50a2acc3330323fe06cc0c2eeca7e | |
parent | 0677ba3c1ec30dd3a8aad8047e85081f4c09a6ff (diff) |
include <sys/types.h> explicitly if __unix__, to make sure macros visible
the _BIG_ENDIAN macro on NetBSD 9 and Solaris 9 are already visible here.
but it's because <sys/types.h> is included indirectly via <stdlib.h>
or <memory.h>. that's fragile against changes in those headers.
pointed out by obache-san
-rw-r--r-- | lib/sha1.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -10,6 +10,9 @@ #include <memory.h> #include <stdio.h> #include <stdlib.h> +#ifdef __unix__ +#include <sys/types.h> /* make sure macros like _BIG_ENDIAN visible */ +#endif #endif #ifdef SHA1DC_CUSTOM_INCLUDE_SHA1_C |