Convert REINPLACE_CMD to patch file

This commit is contained in:
Sunpoet Po-Chuan Hsieh
2021-03-03 18:07:38 +00:00
parent 5ad9933817
commit 5c8214fbf2
2 changed files with 11 additions and 3 deletions

View File

@@ -18,7 +18,4 @@ GNU_CONFIGURE= yes
PLIST_FILES= bin/agedu \
man/man1/agedu.1.gz
post-patch:
@${REINPLACE_CMD} -e 's|HOST_NAME_MAX|_POSIX_&|' ${WRKSRC}/httpd.c
.include <bsd.port.mk>

View File

@@ -0,0 +1,11 @@
--- httpd.c.orig 2020-07-05 01:20:14 UTC
+++ httpd.c
@@ -570,7 +570,7 @@ static int make_listening_sockets(struct listenfds *fd
portstr = NULL; /* normalise NULL and empty string */
if (!address) {
- char hostname[HOST_NAME_MAX];
+ char hostname[_POSIX_HOST_NAME_MAX];
if (gethostname(hostname, sizeof(hostname)) < 0) {
perror("hostname");
return -1;