Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage-utils:master commit in: libq/
Date: Fri, 29 Dec 2017 11:45:16
Message-Id: 1514546169.913d23e85ae155edf6f9d957ecc6e938caf91683.grobian@gentoo
1 commit: 913d23e85ae155edf6f9d957ecc6e938caf91683
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 28 16:56:59 2017 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 29 11:16:09 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=913d23e8
7
8 hash_fd: ensure __BYTE_ORDER is set
9
10 Fallback to using sys/param.h when __BYTE_ORDER isn't set (which it
11 isn't on Darwin at least)
12
13 libq/hash_fd.c | 13 +++++++++++++
14 1 file changed, 13 insertions(+)
15
16 diff --git a/libq/hash_fd.c b/libq/hash_fd.c
17 index c021267..49e3af5 100644
18 --- a/libq/hash_fd.c
19 +++ b/libq/hash_fd.c
20 @@ -28,6 +28,19 @@
21 #include <string.h>
22 #include <unistd.h>
23
24 +#ifdef HAVE_SYS_PARAM_H
25 +# include <sys/param.h>
26 +# ifndef __BYTE_ORDER
27 +# define __BYTE_ORDER BYTE_ORDER
28 +# endif
29 +# ifndef __BIG_ENDIAN
30 +# define __BIG_ENDIAN BIG_ENDIAN
31 +# endif
32 +# ifndef __LITTLE_ENDIAN
33 +# define __LITTLE_ENDIAN LITTLE_ENDIAN
34 +# endif
35 +#endif
36 +
37 #include "busybox.h"
38
39 #ifdef CONFIG_SHA1SUM