From d17a178f80d0e0e982214701d67fb3bdc9c6c01f Mon Sep 17 00:00:00 2001 From: john aman Date: Wed, 24 Feb 2021 09:09:37 -0500 Subject: [PATCH] Fix to compile for gcc-10, g++-10 (Debian Sid) --- Makefile | 4 ++-- libstuff/libstuff.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a7cee65cf..85e3b1177 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Set the compiler, if it's not set by the environment. ifndef GXX - GXX = g++-9 + GXX = g++-10 endif ifndef CC - CC = gcc-9 + CC = gcc-10 endif GIT_REVISION = $(shell git rev-parse --short HEAD) diff --git a/libstuff/libstuff.cpp b/libstuff/libstuff.cpp index 2b974144b..2f43821b5 100644 --- a/libstuff/libstuff.cpp +++ b/libstuff/libstuff.cpp @@ -26,7 +26,7 @@ #endif // Common error definitions -#define S_errno errno +#define S_errno (unsigned int) errno #define S_NOTINITIALISED 0xFEFEFEFE // Doesn't exist for Linux #ifdef __APPLE__ // The above doesn't even build on OS X with C++11 turned on. I don't know why