Skip to contentSkip to conversation

LVM2/test/lib harness.c

PATCH [email protected] 1 participant 1 message Jan 10, 2011

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-01-10 13:25:22

Modified files:
test/lib : harness.c

Log message:
Use strndup as GNU extension

strndup needs _GNU_SOURCE defined as it's GNU extension. Remove duplicate string.h header added in previous harness commit.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/lib/harness.c.diff?cvsroot=lvm2&r1=1.2&r2=1.3

test/lib/harness.c +1 -1
@@ -12,6 +12,7 @@
  * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#define _GNU_SOURCE
 #include <fcntl.h>
 #include <string.h>
 #include <stdio.h>
@@ -19,7 +20,6 @@
 #include <sys/wait.h>
 #include <unistd.h>
 #include <stdlib.h>
-#include <string.h>
 
 static pid_t pid;
 static int fds[2];