]> Savannah Git Hosting - gnulib.git/commitdiff
get_ppid_of: Add support for DragonFly BSD.
authorBruno Haible <bruno@clisp.org>
Tue, 8 Jun 2021 01:40:26 +0000 (03:40 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 8 Jun 2021 01:40:26 +0000 (03:40 +0200)
* lib/get_ppid_of.c: Treat DragonFly BSD like FreeBSD.

ChangeLog
lib/get_ppid_of.c

index ec12d5d65db0a21ccc8a86ad6ce2f2305c40743a..fd067c3f26e0d24a408c348012667ccb290f2c44 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-06-07  Bruno Haible  <bruno@clisp.org>
+
+       get_ppid_of: Add support for DragonFly BSD.
+       * lib/get_ppid_of.c: Treat DragonFly BSD like FreeBSD.
+
 2021-06-07  Bruno Haible  <bruno@clisp.org>
 
        sigsegv: Document context type for DragonFly BSD.
index ed9f25fdb75df0ea39b9162d30d358456a324d80..f153b7539c3813931251dfcf2716adf764634e8a 100644 (file)
@@ -23,7 +23,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#if defined __linux__ || defined __ANDROID__ || (defined __FreeBSD_kernel__ && !defined __FreeBSD__) || defined __GNU__ || defined __FreeBSD__ || defined __NetBSD__ || defined __minix || defined __sun /* Linux, GNU/kFreeBSD, GNU/Hurd, FreeBSD, NetBSD, Minix, Solaris */
+#if defined __linux__ || defined __ANDROID__ || (defined __FreeBSD_kernel__ && !defined __FreeBSD__) || defined __GNU__ || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__ || defined __minix || defined __sun /* Linux, GNU/kFreeBSD, GNU/Hurd, FreeBSD, NetBSD, Minix, Solaris */
 # include <fcntl.h>
 # include <unistd.h>
 #endif
@@ -108,7 +108,7 @@ get_ppid_of (pid_t pid)
 
 #endif
 
-#if defined __FreeBSD__ || defined __NetBSD__               /* FreeBSD, NetBSD */
+#if defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__ /* FreeBSD, NetBSD */
 
   /* Read the contents of /proc/<pid>/status into memory.  */
   char filename[6 + 10 + 7 + 1];