Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cr-marcstevens/sha1collisiondetection.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSODA 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
commitc93f0b4401de582685f9237a832fa6b3716cfe2a (patch)
treeb2e6dd60cec50a2acc3330323fe06cc0c2eeca7e
parent0677ba3c1ec30dd3a8aad8047e85081f4c09a6ff (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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sha1.c b/lib/sha1.c
index a116893..d594882 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -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