diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-11-30 17:44:43 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-11-30 17:44:43 +0000 |
commit | b8b32b81b482f35f7c36ae9dd266028af613c3dc (patch) | |
tree | 3884ea82d3157ff7a0a9acc567f3eda0d4af2aa3 | |
parent | 2524544fa0c6ca061b6d22d4e94173a3ee1289c3 (diff) | |
download | s6-b8b32b81b482f35f7c36ae9dd266028af613c3dc.tar.xz |
- Fix selfpipe_read() invocation: the return is int, not char
- Easier CROSS_COMPILE support in configure
-rwxr-xr-x | configure | 5 | ||||
-rw-r--r-- | src/conn-tools/s6-ioconnect.c | 3 | ||||
-rw-r--r-- | src/supervision/s6-supervise.c | 3 |
3 files changed, 5 insertions, 6 deletions
@@ -120,7 +120,7 @@ tryldflag () { # Actual script -CC_AUTO="$CC" +CC_AUTO= CFLAGS_AUTO="$CFLAGS" CPPFLAGS_AUTO="-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -O2 $CPPFLAGS" LDFLAGS_AUTO="$LDFLAGS" @@ -253,6 +253,7 @@ fi # Find a C compiler to use echo "checking for C compiler..." +trycc ${cross}${CC} trycc ${cross}gcc trycc ${cross}c99 trycc ${cross}cc @@ -362,7 +363,7 @@ SYSCLOCK_LIB := ${sysclock_lib} TAINNOW_LIB := ${tainnow_lib} UTIL_LIB := ${util_lib} -CC := $CC_AUTO +CC := ${CC_AUTO##${cross}} CFLAGS := $CFLAGS_AUTO CPPFLAGS := $CPPFLAGS_AUTO LDFLAGS := $LDFLAGS_AUTO diff --git a/src/conn-tools/s6-ioconnect.c b/src/conn-tools/s6-ioconnect.c index 01966cf..abd309b 100644 --- a/src/conn-tools/s6-ioconnect.c +++ b/src/conn-tools/s6-ioconnect.c @@ -55,8 +55,7 @@ static void handle_signals (void) { for (;;) { - char c = selfpipe_read() ; - switch (c) + switch (selfpipe_read()) { case -1 : strerr_diefu1sys(111, "selfpipe_read") ; case 0 : return ; diff --git a/src/supervision/s6-supervise.c b/src/supervision/s6-supervise.c index 80ba5f8..2e8fa38 100644 --- a/src/supervision/s6-supervise.c +++ b/src/supervision/s6-supervise.c @@ -500,8 +500,7 @@ static inline void handle_signals (void) { for (;;) { - char c = selfpipe_read() ; - switch (c) + switch (selfpipe_read()) { case -1 : strerr_diefu1sys(111, "selfpipe_read") ; case 0 : return ; |