Files
macports-ports/net/cryptcat/files/patch-netcat.c.diff
Ryan Schmidt 2d56e4c35e cryptcat: Fix implicit func decls; modernize
Fix implicit declaration of functions that prevented building with
Xcode 12+. Modernize checksums. Use "use_tar yes" instead of doing it
manually. Use leading 0 for octal numbers. Use makefile portgroup which
makes the port use the right compiler and flags and adds a universal
variant.

Closes: https://trac.macports.org/ticket/63124
2021-07-02 07:54:32 -05:00

49 lines
1.3 KiB
Diff

--- netcat.c.orig 2005-10-18 12:42:05.000000000 -0500
+++ netcat.c 2021-07-02 07:48:55.000000000 -0500
@@ -48,9 +48,6 @@
#else
#include <malloc.h>
#endif
-#ifdef HAVE_SELECT_H /* random SV variants need this */
-#include <sys/select.h>
-#endif
/* have to do this *before* including types.h. xxx: Linux still has it wrong */
#ifdef FD_SETSIZE /* should be in types.h, butcha never know. */
@@ -59,6 +56,10 @@
#define FD_SETSIZE 16 /* <-- this'll give us a long anyways, wtf */
#include <sys/types.h> /* *now* do it. Sigh, this is broken */
+#ifdef HAVE_SELECT_H /* random SV variants need this */
+#include <sys/select.h>
+#endif
+
#ifdef HAVE_RANDOM /* aficionados of ?rand48() should realize */
#define SRAND srandom /* that this doesn't need *strong* random */
#define RAND random /* numbers just to mix up port numbers!! */
@@ -81,9 +82,13 @@
#include <errno.h>
#include <signal.h>
#include <fcntl.h> /* O_WRONLY et al */
-
-#ifdef LINUX
+#include <unistd.h>
#include <resolv.h>
+
+#include "farm9crypt.h"
+
+#ifdef HAVE_HELP
+void helpme(void);
#endif
/* handy stuff: */
@@ -1661,7 +1666,7 @@
#ifdef HAVE_HELP /* unless we wanna be *really* cryptic */
/* helpme :
the obvious */
-helpme()
+void helpme(void)
{
o_verbose = 1;
holler ("[v1.10]\n\