Browse Source

Fix build on linux-musl

[ Done by updating CCAN with the ccan/endian fix --RR ]
ppa-0.6.1
nicolas.dorier 7 years ago
committed by Rusty Russell
parent
commit
59154ebd34
  1. 2
      ccan/README
  2. 8
      ccan/ccan/endian/endian.h
  3. 2
      ccan/ccan/opt/usage.c
  4. 3
      ccan/tools/configurator/configurator.c

2
ccan/README

@ -1,3 +1,3 @@
CCAN imported from http://ccodearchive.net.
CCAN version: init-2419-g9bdb4be8
CCAN version: init-2423-g696c9b68

8
ccan/ccan/endian/endian.h

@ -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

2
ccan/ccan/opt/usage.c

@ -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>");

3
ccan/tools/configurator/configurator.c

@ -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…
Cancel
Save