diff --git a/xemacs-21.5.34-sbrk.patch b/xemacs-21.5.34-sbrk.patch new file mode 100644 index 0000000..1118101 --- /dev/null +++ b/xemacs-21.5.34-sbrk.patch @@ -0,0 +1,21 @@ +--- src/gmalloc.c ++++ src/gmalloc.c 2017-03-20 15:02:35.000000000 +0000 +@@ -1199,18 +1199,6 @@ along with the GNU C Library. If not, s + #include + #endif + +-/* #ifndef __GNU_LIBRARY__ */ +-#define __sbrk sbrk +-/* #endif */ +- +-#ifdef __GNU_LIBRARY__ +-/* It is best not to declare this and cast its result on foreign operating +- systems with potentially hostile include files. */ +-#if !(defined(linux) && defined(sparc)) +-extern __ptr_t __sbrk __P ((int increment)); +-#endif +-#endif +- + #ifndef NULL + #define NULL 0 + #endif diff --git a/xemacs.changes b/xemacs.changes index d21d681..1ce275c 100644 --- a/xemacs.changes +++ b/xemacs.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Mar 20 15:21:17 UTC 2017 - werner@suse.de + +- Add patch xemacs-21.5.34-sbrk.patch to avoid redefinition of sbrk + ------------------------------------------------------------------- Fri Nov 27 13:35:03 UTC 2015 - werner@suse.de diff --git a/xemacs.spec b/xemacs.spec index 8506d13..dbea59b 100644 --- a/xemacs.spec +++ b/xemacs.spec @@ -1,7 +1,7 @@ # # spec file for package xemacs # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -96,6 +96,8 @@ Patch57: xemacs-21.5.34-Xaw3D_I18N.patch Patch58: xemacs-21.5.34-custom-fonts.patch # PATCH-FIX-SUSE do wait on alsa Patch59: xemacs-21.5.34-alsaplay.patch +# PATCH-FIX-SUSE avoid redefinition of sbrk +Patch60: xemacs-21.5.34-sbrk.patch Requires(pre): permissions Requires: ctags Requires: efont-unicode @@ -188,6 +190,7 @@ echo Use xfs, that is XFontSet support for internationalized menubar. %patch57 -p0 %patch58 -p0 %patch59 -p1 +%patch60 -p0 %patch0 -p1 find lisp/ etc/ -name '*.elc' | xargs -r rm -f find . -name CVS -type d | xargs rm -rf @@ -372,6 +375,12 @@ COMP="--with-gcc \ --with-cflags=\"${CFLAGS}\" \ " eval ./configure $SYS $COMP $PREFIX $SPECIAL $X11 $MULE $FONTS $MAIL +if grep -q _DEFAULT_SOURCE /usr/include/features.h ; then + sed -ri '/^(#[[:blank:]]*define[[:blank:]]+_(BSD|SVID)_SOURCE)/{ + s/_BSD_SOURCE/_DEFAULT_SOURCE/ + s/_SVID_SOURCE/_DEFAULT_SOURCE/ + }' src/config.h +fi make %{?_smp_mflags} %install