aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2008-12-17 18:04:55 +0000
committerDaniel P. Berrange <berrange@redhat.com>2008-12-17 18:04:55 +0000
commitf4cbc9370edbffed5224aca2017efae427a5ba7d (patch)
treef06e38055478d0581a7ab89bfcc8a3dcba8f37ea /tests/testutils.c
parentenforce the "include <config.h> first" rule (diff)
downloadlibvirt-f4cbc9370edbffed5224aca2017efae427a5ba7d.tar.gz
libvirt-f4cbc9370edbffed5224aca2017efae427a5ba7d.tar.bz2
libvirt-f4cbc9370edbffed5224aca2017efae427a5ba7d.zip
Remove use of _PATH_DEVNULL in favour of /dev/null for portability (John Levon)
Diffstat (limited to 'tests/testutils.c')
-rw-r--r--tests/testutils.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/testutils.c b/tests/testutils.c
index 187123cc2..7c6ae61b1 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -35,10 +35,6 @@
#include <paths.h>
#endif
-#ifndef _PATH_DEVNULL
-#define _PATH_DEVNULL "/dev/null"
-#endif
-
#define GETTIMEOFDAY(T) gettimeofday(T, NULL)
#define DIFF_MSEC(T, U) \
((((int) ((T)->tv_sec - (U)->tv_sec)) * 1000000.0 + \
@@ -155,9 +151,9 @@ void virtTestCaptureProgramExecChild(const char *const argv[],
NULL
};
- if ((stdinfd = open(_PATH_DEVNULL, O_RDONLY)) < 0)
+ if ((stdinfd = open("/dev/null", O_RDONLY)) < 0)
goto cleanup;
- if ((stderrfd = open(_PATH_DEVNULL, O_WRONLY)) < 0)
+ if ((stderrfd = open("/dev/null", O_WRONLY)) < 0)
goto cleanup;
open_max = sysconf (_SC_OPEN_MAX);