From 32fce523b0891e60328211cc936f22a0e5c2942d Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Fri, 28 Dec 2007 14:02:55 +0100 Subject: [PATCH] Makefile.in: Fix OS detection. The uname_s variable was never defined. Define it and rename SYSTEM to UNAME_RS while we are at it. --- Makefile.in | 7 ++++--- command.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in index 9382ce75..0af8cddd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -9,7 +9,8 @@ MANDIR := @datarootdir@/man/man1 install_sh := @install_sh@ build_date := $(shell date) -system := $(shell uname -rs) +uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS") +uname_rs := $(shell uname -rs) cc_version := $(shell $(CC) --version | head -n 1) codename := solar saturation @@ -26,7 +27,7 @@ DEBUG_CPPFLAGS += -Wredundant-decls # many warnings about trivial stuff # CPPFLAGS += -Wconversion -ifeq ($(uname_S),Linux) +ifeq ($(uname_s),Linux) CPPFLAGS += -fdata-sections -ffunction-sections LDFLAGS += -Wl,--gc-sections CPPFLAGS += -Wstrict-prototypes @@ -39,7 +40,7 @@ CPPFLAGS += -Wchar-subscripts CPPFLAGS += -Wformat-security CPPFLAGS += -DBINDIR='"$(BINDIR)"' CPPFLAGS += -DBUILD_DATE='"$(build_date)"' -CPPFLAGS += -DSYSTEM='"$(system)"' +CPPFLAGS += -DUNAME_RS='"$(uname_rs)"' CPPFLAGS += -DCODENAME='"$(codename)"' CPPFLAGS += -DCC_VERSION='"$(cc_version)"' CPPFLAGS += -Werror-implicit-function-declaration diff --git a/command.c b/command.c index d35113a5..6886ae9b 100644 --- a/command.c +++ b/command.c @@ -309,7 +309,7 @@ int com_version(int fd, int argc, __a_unused char * const * argv) return -E_COMMAND_SYNTAX; return send_buffer(fd, VERSION_TEXT("server") "built: " BUILD_DATE "\n" - SYSTEM ", " CC_VERSION "\n" + UNAME_RS ", " CC_VERSION "\n" ); } -- 2.39.2