summaryrefslogtreecommitdiffstats
path: root/web/attachments/222424-check_icmp.32bit-pid_t.patch
blob: a3154ed6f8a9bf29c18352e312c2a7e25dc295d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Index: plugins-root/check_icmp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins-root/check_icmp.c,v
retrieving revision 1.11
diff -u -r1.11 check_icmp.c
--- plugins-root/check_icmp.c	8 Mar 2007 09:09:38 -0000	1.11
+++ plugins-root/check_icmp.c	27 Mar 2007 06:29:32 -0000
@@ -395,7 +395,8 @@
 	environ = NULL;
 
 	/* use the pid to mark packets as ours */
-	pid = getpid();
+	/* Some systems have 32-bit pid_t so mask off only 16 bits */
+	pid = getpid() & 0xffff;
 	/* printf("pid = %u\n", pid); */
 
 	/* get calling name the old-fashioned way for portability instead