Files
macports-ports/sysutils/man/files/patch-int-main.diff

66 lines
2.1 KiB
Diff

--- configure.orig 2025-02-05 18:18:26.282384940 +1100
+++ configure 2025-02-05 18:19:18.847823147 +1100
@@ -225,7 +225,7 @@
echo checking for ANSI C header files
echo "#include <stdlib.h>
#include <string.h>
-main() { exit(0); strerror(0); }" > conftest.c
+int main() { exit(0); strerror(0); }" > conftest.c
eval $compile
if test -s conftest && ./conftest 2>/dev/null; then
DEFS="$DEFS -DSTDC_HEADERS"
@@ -239,7 +239,7 @@
echo checking for sys/termios.h
echo "#include <sys/termios.h>
#include <stdlib.h>
-main() { exit(0); }" > conftest.c
+int main() { exit(0); }" > conftest.c
eval $compile
if test -s conftest && ./conftest 2>/dev/null; then
DEFS="$DEFS -DTERMIOS_HEADER"
@@ -249,7 +249,7 @@
echo checking for POSIX.1 header files
echo "#include <unistd.h>
#include <stdlib.h>
-main() {
+int main() {
#ifdef _POSIX_VERSION
exit(0);
#else
@@ -265,7 +265,7 @@
echo checking for BSD string and memory functions
echo "#include <strings.h>
#include <stdlib.h>
-main() { exit(0); rindex(0, 0); bzero(0, 0); }" > conftest.c
+int main() { exit(0); rindex(0, 0); bzero(0, 0); }" > conftest.c
eval $compile
if test -s conftest && ./conftest 2>/dev/null; then :
else DEFS="$DEFS -DUSG"
@@ -275,7 +275,7 @@
echo checking whether sys/types.h defines uid_t
echo '#include <sys/types.h>
#include <stdlib.h>
-main() { uid_t x; exit(0); }' > conftest.c
+int main() { uid_t x; exit(0); }' > conftest.c
eval $compile
if test -s conftest && ./conftest 2>/dev/null; then :
else
@@ -309,7 +309,7 @@
#endif
#endif
#endif
-main() { char *p = (char *) alloca(1); exit(0); }' > conftest.c
+int main() { char *p = (char *) alloca(1); exit(0); }' > conftest.c
eval $compile
if test -s conftest && ./conftest 2>/dev/null; then :
elif test -d /usr/ucblib; then LIBS="$LIBS -L/usr/ucblib -lucb"
@@ -341,7 +341,7 @@
#include <stdio.h>
#include <stdlib.h>
struct option long_opts[] = { { "", no_argument, NULL, 0 } };
-main() { exit(0); }' > conftest.c
+int main() { exit(0); }' > conftest.c
eval $compile
if test -s conftest && ./conftest 2>/dev/null; then
manpathoption="--path"