SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,39 @@
--- socket.c.orig 1995-08-14 20:36:48.000000000 +0200
+++ socket.c 2004-01-05 01:06:02.000000000 +0100
@@ -71,7 +71,7 @@
#include <unistd.h>
#endif
#include <stdlib.h>
-#include <varargs.h>
+#include <stdarg.h>
#include "bzero.h"
#include "socket.h"
@@ -102,7 +102,7 @@ int clientPort;
{
hp = gethostbyname(host);
if (hp == NULL)
- return -1;
+ return -2;
memcpy(&ad.sin_addr, hp->h_addr, hp->h_length);
}
ad.sin_port = htons(clientPort);
@@ -225,15 +225,13 @@ int len;
}
-int SockPrintf(socket,format,va_alist)
-int socket;
-char *format;
-va_dcl {
+int SockPrintf(int socket,char *format, ...)
+{
va_list ap;
char buf[8192];
- va_start(ap);
+ va_start(ap, format);
vsprintf(buf, format, ap);
va_end(ap);
return SockWrite(socket, buf, strlen(buf));