diff --git a/calc-c99.patch b/calc-c99.patch new file mode 100644 index 0000000..772bcff --- /dev/null +++ b/calc-c99.patch @@ -0,0 +1,46 @@ +Include for the memset function, to avoid an implicit +function declaration. + +Submitted upstream: + +diff --git a/Makefile b/Makefile +index 99bce2a9d1f77199..9f1b8dc8a2779456 100644 +--- a/Makefile ++++ b/Makefile +@@ -3218,7 +3218,7 @@ have_fgetsetpos.h: have_fgetsetpos.c banned.h have_ban_pragma.h ${MAKE_FILE} ${L + ${TRUE}; \ + fi + +-have_fpos_pos.h: have_fpos_pos.c have_fgetsetpos.h have_posscl.h \ ++have_fpos_pos.h: have_fpos_pos.c have_fgetsetpos.h have_posscl.h have_string.h \ + banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF} + ${Q} ${RM} -f fpos_tmp $@ + ${H} echo 'forming $@' +diff --git a/Makefile.simple b/Makefile.simple +index fd97064b045dc9dc..3d82f06dc1ddf67e 100644 +--- a/Makefile.simple ++++ b/Makefile.simple +@@ -2532,7 +2532,7 @@ have_fgetsetpos.h: have_fgetsetpos.c banned.h have_ban_pragma.h ${MAKE_FILE} ${L + ${TRUE}; \ + fi + +-have_fpos_pos.h: have_fpos_pos.c have_fgetsetpos.h have_posscl.h \ ++have_fpos_pos.h: have_fpos_pos.c have_fgetsetpos.h have_posscl.h have_string.h \ + banned.h have_ban_pragma.h ${MAKE_FILE} ${LOC_MKF} + ${Q} ${RM} -f fpos_tmp $@ + ${H} echo 'forming $@' +diff --git a/have_fpos_pos.c b/have_fpos_pos.c +index 72e2fa43ed423df7..0527905247b1b1e7 100644 +--- a/have_fpos_pos.c ++++ b/have_fpos_pos.c +@@ -28,6 +28,10 @@ + #include + #include "have_fgetsetpos.h" + #include "have_posscl.h" ++#include "have_string.h" ++#ifdef HAVE_STRING_H ++# include ++#endif + + + #include "banned.h" /* include after system header <> includes */ diff --git a/calc.spec b/calc.spec index a876b5b..872978b 100644 --- a/calc.spec +++ b/calc.spec @@ -24,6 +24,7 @@ URL: http://isthe.com/chongo/tech/comp/calc/ Source0: https://github.com/lcn2/calc/releases/download/v%{version}/calc-%{version}.tar.bz2 Source1: calc-converted-to-gpl.txt Source2: calc-COPYING-GPL +Patch0: calc-c99.patch BuildRequires: gcc, sed, util-linux @@ -81,7 +82,7 @@ useful in themselves. %prep -%setup -q +%autosetup -p1 %if %{with_readline} for f in help.c version.c calc.man $( ls help/*|grep '^help/credit$' ) ; do