diff --git a/Dockerfile b/Dockerfile index e23493e..72a539b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,9 +26,13 @@ RUN apt-get update \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* +# Workaround for Pi's +ADD fcntl-linux.h.patch /tmp + # Build SBBS RUN apt-get update \ - && apt-get install -yqq build-essential libnspr4-dev libncurses5-dev libmozjs185-dev cvs wget pkgconf \ + && apt-get install -yqq build-essential libnspr4-dev libncurses5-dev libmozjs185-dev cvs wget pkgconf patch \ + && cd / && patch -p1 < /tmp/fcntl-linux.h.patch \ && mkdir /opt/sbbs && cd /tmp \ && wget http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/install/GNUmakefile \ && make RELEASE=1 USE_DOSEMU=1 NO_X=1 JSINCLUDE=/usr/include/js JSLIB=mozjs185 SBBSDIR=/opt/sbbs install \ @@ -41,7 +45,7 @@ RUN apt-get update \ && ln -sf nodes/node3 /opt/sbbs/ \ && ln -sf nodes/node4 /opt/sbbs/ \ && find /opt/sbbs -name CVS -type d -exec rm -rf {} + \ - && apt-get -y purge build-essential libnspr4-dev libncurses5-dev libmozjs185-dev cvs wget pkgconf \ + && apt-get -y purge build-essential libnspr4-dev libncurses5-dev libmozjs185-dev cvs wget pkgconf patch \ && apt-get -y autoremove \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* diff --git a/fcntl-linux.h.patch b/fcntl-linux.h.patch new file mode 100644 index 0000000..8794d86 --- /dev/null +++ b/fcntl-linux.h.patch @@ -0,0 +1,26 @@ +diff --git a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h b/sysdeps/unix/sysv/linux/bits/fcntl-linux.h +index 7e5b0aecdcb4..5a4aad0698b8 100644 +--- a/sysdeps/unix/sysv/linux/bits/fcntl-linux.h ++++ b/usr/include/arm-linux-gnueabihf/bits/fcntl-linux.h +@@ -127,11 +127,17 @@ + This means that they are inherited across fork or clone with CLONE_FILES + like BSD (flock) locks, and they are only released automatically when the + last reference to the the file description against which they were acquired +- is put. */ ++ is put. ++ ++ Note that Linux does not support legacy (non-LFS) struct flock on 32-bit ++ arches with OFD locks. On those arches you need define both _GNU_SOURCE ++ and _FILE_OFFSET_BITS=64. */ + #ifdef __USE_GNU +-# define F_OFD_GETLK 36 +-# define F_OFD_SETLK 37 +-# define F_OFD_SETLKW 38 ++# if __OFF_T_MATCHES_OFF64_T || defined __USE_FILE_OFFSET64 ++# define F_OFD_GETLK 36 ++# define F_OFD_SETLK 37 ++# define F_OFD_SETLKW 38 ++# endif + #endif + + #ifdef __USE_LARGEFILE64