aboutsummaryrefslogtreecommitdiffstats
path: root/www/dhttpd
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2002-10-21 08:41:02 +0800
committerkris <kris@FreeBSD.org>2002-10-21 08:41:02 +0800
commit38b984a1a0fbbe046359ea36b16305ab1e896d4e (patch)
tree871ecb5ae91f38cf2bb9299e54fbdb61a384bfd3 /www/dhttpd
parentfe220053fae80bca762a3a2133d136026e55f0d9 (diff)
downloadfreebsd-ports-gnome-38b984a1a0fbbe046359ea36b16305ab1e896d4e.tar.gz
freebsd-ports-gnome-38b984a1a0fbbe046359ea36b16305ab1e896d4e.tar.zst
freebsd-ports-gnome-38b984a1a0fbbe046359ea36b16305ab1e896d4e.zip
Fix build on -current (#include <stdlib.h> for exit() prototype) and
respect CC and CFLAGS
Diffstat (limited to 'www/dhttpd')
-rw-r--r--www/dhttpd/files/patch-Makefile28
-rw-r--r--www/dhttpd/files/patch-main.cc10
2 files changed, 35 insertions, 3 deletions
diff --git a/www/dhttpd/files/patch-Makefile b/www/dhttpd/files/patch-Makefile
new file mode 100644
index 000000000000..634845426973
--- /dev/null
+++ b/www/dhttpd/files/patch-Makefile
@@ -0,0 +1,28 @@
+--- src/Makefile.orig Mon Mar 3 16:35:53 1997
++++ src/Makefile Sun Oct 20 17:42:06 2002
+@@ -1,22 +1,21 @@
+ # if compiling for SunOS, you need to add -lsocket to the LIBS variable
+
+ SH = /bin/sh
+-CC = gcc
++CXX ?= c++
+ MAKEFILE= Makefile
+-CFLAGS = -O2 --pipe
+ LIBS =
+
+ OBJECTS = main.o socket.o httpsock.o
+
+ .cc.o:
+- $(CC) $(CFLAGS) -c -o $*.o $<
++ $(CXX) $(CXXFLAGS) -c -o $*.o $<
+
+ all: compile dhttpd
+
+ compile: $(OBJECTS)
+
+ dhttpd: $(OBJECTS)
+- $(CC) -o dhttpd $(OBJECTS) $(LIBS)
++ $(CXX) -o dhttpd $(OBJECTS) $(LIBS)
+ strip dhttpd
+
+ clean:
diff --git a/www/dhttpd/files/patch-main.cc b/www/dhttpd/files/patch-main.cc
index 1572b8060663..77b53a87a683 100644
--- a/www/dhttpd/files/patch-main.cc
+++ b/www/dhttpd/files/patch-main.cc
@@ -1,6 +1,6 @@
---- src/main.cc Tue Mar 4 09:10:41 1997
-+++ src/main.cc.orig Mon Jun 24 15:12:32 2002
-@@ -18,7 +18,6 @@
+--- src/main.cc.orig Mon Mar 3 17:10:41 1997
++++ src/main.cc Sun Oct 20 17:41:25 2002
+@@ -18,10 +18,10 @@
*/
#include <errno.h>
@@ -8,3 +8,7 @@
#include <pwd.h>
#include <signal.h>
#include <stdio.h>
++#include <stdlib.h>
+ #include <unistd.h>
+ #include <sys/socket.h>
+ #include <sys/types.h>