mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
Fix build on linux-musl
[ Done by updating CCAN with the ccan/endian fix --RR ]
This commit is contained in:
parent
3abd9ad4f6
commit
59154ebd34
@ -1,3 +1,3 @@
|
||||
CCAN imported from http://ccodearchive.net.
|
||||
|
||||
CCAN version: init-2419-g9bdb4be8
|
||||
CCAN version: init-2423-g696c9b68
|
||||
|
@ -113,9 +113,17 @@ static inline uint64_t bswap_64(uint64_t val)
|
||||
#elif HAVE_LITTLE_ENDIAN && HAVE_BIG_ENDIAN
|
||||
#error "Can't compile for both big and little endian."
|
||||
#elif HAVE_LITTLE_ENDIAN
|
||||
#ifndef __BYTE_ORDER
|
||||
#define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
#elif __BYTE_ORDER != __LITTLE_ENDIAN
|
||||
#error "__BYTE_ORDER already defined, but not equal to __LITTLE_ENDIAN"
|
||||
#endif
|
||||
#elif HAVE_BIG_ENDIAN
|
||||
#ifndef __BYTE_ORDER
|
||||
#define __BYTE_ORDER __BIG_ENDIAN
|
||||
#elif __BYTE_ORDER != __BIG_ENDIAN
|
||||
#error "__BYTE_ORDER already defined, but not equal to __BIG_ENDIAN"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -110,7 +110,7 @@ static char *add_desc(char *base, size_t *len, size_t *max,
|
||||
|
||||
base = add_str(base, len, max, opt->names);
|
||||
off = strlen(opt->names);
|
||||
if (opt->type == OPT_HASARG
|
||||
if ((opt->type & OPT_HASARG)
|
||||
&& !strchr(opt->names, ' ')
|
||||
&& !strchr(opt->names, '=')) {
|
||||
base = add_str(base, len, max, " <arg>");
|
||||
|
@ -102,7 +102,8 @@ static struct test tests[] = {
|
||||
"#include <stdio.h>\n"
|
||||
"static char *func(int x) {"
|
||||
" char *p;\n"
|
||||
" if (asprintf(&p, \"%u\", x) == -1) p = NULL;"
|
||||
" if (asprintf(&p, \"%u\", x) == -1) \n"
|
||||
" p = NULL;\n"
|
||||
" return p;\n"
|
||||
"}" },
|
||||
{ "HAVE_ATTRIBUTE_COLD", DEFINES_FUNC, NULL, NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user