From 87432778bb0f103c8ea1bdb358228e94e65ade72 Mon Sep 17 00:00:00 2001 From: Xavi Hernandez Date: Mon, 27 Mar 2023 15:36:45 +0200 Subject: [PATCH] configure: force 'char' type to be signed (#4039) On some systems, the 'char' type is interpreted as an unsigned char. This may cause some issues as Gluster code assumes that 'char' is signed. This patch adds the '-fsigned-char' option during compilation to make sure it works as expected. Updates: #1000 Signed-off-by: Xavi Hernandez --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 5c99ceadf0..ef07fb2fc3 100644 --- a/configure.ac +++ b/configure.ac @@ -270,6 +270,9 @@ if test "x$RPCGEN" = "xno"; then AC_MSG_ERROR([`rpcgen` not found, glusterfs needs `rpcgen` exiting..]) fi +# Force 'char' type to be signed +CFLAGS="${CFLAGS} -fsigned-char" + # Initialize CFLAGS before usage AC_ARG_ENABLE([debug], AC_HELP_STRING([--enable-debug],