View | Details | Raw Unified | Return to bug 205039 | Differences between
and this patch

Collapse All | Expand All

(-)sysutils/pesign/Makefile (-6 / +3 lines)
Lines 23-34 GH_ACCOUNT= rhinstaller Link Here
23
USES=		gmake pkgconfig
23
USES=		gmake pkgconfig
24
USE_LDCONFIG=	yes
24
USE_LDCONFIG=	yes
25
25
26
.include <bsd.port.pre.mk>
26
EXTRA_PATCHES=	${EXTRA_PATCHES_${OPSYS}_${OSREL:R}}
27
EXTRA_PATCHES_FreeBSD_9=	${FILESDIR}/extra-patch-src_client.c
27
28
28
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1001505
29
BROKEN=		This port requires ppoll(2) system call
30
.endif
31
32
post-patch:
29
post-patch:
33
	@${REINPLACE_CMD} -e 's|%%CC%%|${CC}|g' ${WRKSRC}/Make.defaults
30
	@${REINPLACE_CMD} -e 's|%%CC%%|${CC}|g' ${WRKSRC}/Make.defaults
34
31
Lines 43-46 do-install: Link Here
43
	${INSTALL_MAN} ${WRKSRC}/src/pesign-client.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
40
	${INSTALL_MAN} ${WRKSRC}/src/pesign-client.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
44
	${INSTALL_MAN} ${WRKSRC}/src/pesign.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
41
	${INSTALL_MAN} ${WRKSRC}/src/pesign.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
45
42
46
.include <bsd.port.post.mk>
43
.include <bsd.port.mk>
(-)sysutils/pesign/files/extra-patch-src_client.c (+25 lines)
Line 0 Link Here
1
--- src/client.c.orig	2014-10-24 19:51:06 UTC
2
+++ src/client.c
3
@@ -47,6 +47,22 @@ static struct {
4
 	{FLAG_LIST_END, NULL},
5
 };
6
 
7
+#if defined(__FreeBSD__) && __FreeBSD__ < 10
8
+// From lib/libc/string/strchrnul.c on FreeBSD 10+
9
+char *
10
+strchrnul(const char *p, int ch)
11
+{
12
+	char c;
13
+
14
+	c = ch;
15
+	for (;; ++p) {
16
+		if (*p == c || *p == '\0')
17
+			return ((char *)p);
18
+	}
19
+	/* NOTREACHED */
20
+}
21
+#endif
22
+
23
 static void
24
 print_flag_name(FILE *f, int flag)
25
 {
(-)sysutils/pesign/files/patch-src-daemon.c (+9 lines)
Lines 8-13 Link Here
8
 #include <sys/types.h>
8
 #include <sys/types.h>
9
 #include <sys/socket.h>
9
 #include <sys/socket.h>
10
 #include <sys/stat.h>
10
 #include <sys/stat.h>
11
@@ -839,7 +838,7 @@ shutdown:
12
 			do_shutdown(ctx, nsockets, pollfds);
13
 			return 0;
14
 		}
15
-		rc = ppoll(pollfds, nsockets, NULL, NULL);
16
+		rc = poll(pollfds, nsockets, INFTIM);
17
 		if (should_exit != 0)
18
 			goto shutdown;
19
 		if (rc < 0) {
11
@@ -864,8 +863,8 @@ shutdown:
20
@@ -864,8 +863,8 @@ shutdown:
12
 
21
 
13
 			struct sockaddr_un remote;
22
 			struct sockaddr_un remote;

Return to bug 205039