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,25 @@
Index: src/protocol.c
--- src/protocol.c.orig
+++ src/protocol.c
@@ -31,6 +31,12 @@
#include <net/ethernet.h>
#include <sys/types.h>
#include <sys/socket.h>
+#elif defined(__OpenBSD__)
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if.h>
+#include <netinet/in.h>
+#include <netinet/if_ether.h>
#else
#include <netinet/ether.h>
#endif
@@ -553,7 +559,7 @@ int query_mndp_or_mac(char *address, unsigned char *ds
}
} else {
/* Convert mac address string to ether_addr struct */
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__OpenBSD__)
struct ether_addr* dstmac_buf = ether_aton(address);
memcpy(dstmac, dstmac_buf, sizeof(struct ether_addr));
#else