Fix build on -current by including required headers and not trying to
compile/link c++ code with cc(1)
This commit is contained in:
parent
6523dbc789
commit
3c0a12cefe
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=65634
2 changed files with 39 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
|||
--- Makefile.orig Wed Dec 20 00:57:35 2000
|
||||
+++ Makefile Wed Dec 20 00:59:15 2000
|
||||
@@ -10,12 +10,12 @@
|
||||
--- Makefile.orig Wed Sep 20 05:25:36 2000
|
||||
+++ Makefile Wed Sep 4 19:31:33 2002
|
||||
@@ -10,13 +10,13 @@
|
||||
# debugging
|
||||
# DFLAGS = -DTEST -DDEBUG
|
||||
DFLAGS = -DGAPING_SECURITY_HOLE
|
||||
|
@ -11,20 +11,27 @@
|
|||
# -Bstatic for sunos, -static for gcc, etc. You want this, trust me.
|
||||
STATIC =
|
||||
-CC = cc $(CFLAGS)
|
||||
+CC ?= cc
|
||||
LD = $(CC) -s # linker; defaults to stripped executables
|
||||
-LD = $(CC) -s # linker; defaults to stripped executables
|
||||
+CXX ?= c++
|
||||
+LD = $(CXX) -s # linker; defaults to stripped executables
|
||||
o = o # object extension
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
ALL = cryptcat
|
||||
@@ -28,8 +28,11 @@
|
||||
|
||||
### HARD TARGETS
|
||||
|
||||
cryptcat: netcat.c farm9crypt.o twofish2.o
|
||||
-cryptcat: netcat.c farm9crypt.o twofish2.o
|
||||
- $(LD) $(DFLAGS) $(XFLAGS) $(STATIC) -o cryptcat netcat.c farm9crypt.o twofish2.o $(XLIBS)
|
||||
+ $(LD) $(CFLAGS) $(DFLAGS) $(XFLAGS) $(STATIC) -o cryptcat netcat.c farm9crypt.o twofish2.o $(XLIBS)
|
||||
+netcat.o:
|
||||
+ $(CC) $(CFLAGS) -c netcat.c
|
||||
+
|
||||
+cryptcat: netcat.o farm9crypt.o twofish2.o
|
||||
+ $(LD) $(CFLAGS) $(DFLAGS) $(XFLAGS) $(STATIC) -o cryptcat netcat.o farm9crypt.o twofish2.o $(XLIBS)
|
||||
|
||||
nc-dos:
|
||||
@echo "DOS?! Maybe someday, but not now"
|
||||
@@ -82,7 +82,7 @@
|
||||
@@ -82,7 +85,7 @@
|
||||
|
||||
# virtually the same as netbsd/bsd44lite/whatever
|
||||
freebsd:
|
||||
|
@ -33,3 +40,16 @@
|
|||
|
||||
bsdi:
|
||||
make -e $(ALL) $(MFLAGS) XFLAGS='-DBSDI' STATIC=-Bstatic
|
||||
@@ -111,10 +114,10 @@
|
||||
make -e $(ALL) $(MFLAGS) XFLAGS='-DNEXT' STATIC=-Bstatic
|
||||
|
||||
farm9crypt.o: farm9crypt.cc farm9crypt.h
|
||||
- ${CC} -c farm9crypt.cc
|
||||
+ ${CXX} ${CXXFLAGS} -c farm9crypt.cc
|
||||
|
||||
twofish2.o: twofish2.cc twofish2.h
|
||||
- ${CC} -c twofish2.cc
|
||||
+ ${CXX} ${CXXFLAGS} -c twofish2.cc
|
||||
|
||||
# start with this for a new architecture, and see what breaks.
|
||||
generic:
|
||||
|
|
10
net/cryptcat/files/patch-ab
Normal file
10
net/cryptcat/files/patch-ab
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- farm9crypt.cc.orig Mon Oct 2 05:08:44 2000
|
||||
+++ farm9crypt.cc Wed Sep 4 19:27:56 2002
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <sys/types.h> // suggested by several people -- for OpenBSD, FreeBSD compiles
|
||||
#include <sys/socket.h> /* basics, SO_ and AF_ defs, sockaddr, ... */
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
#else
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
Loading…
Reference in a new issue