From dc5e9585215f34ec78b68fbb6da990a90d8f3a1b Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Tue, 6 Mar 2007 16:07:24 -0500 Subject: use paths.h if available --- src/proc-linux.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/proc-linux.c') diff --git a/src/proc-linux.c b/src/proc-linux.c index 30e7d22..a247e75 100644 --- a/src/proc-linux.c +++ b/src/proc-linux.c @@ -28,6 +28,10 @@ #include #include +#ifdef HAVE_PATHS_H +#include +#endif /* HAVE_PATHS_H */ + #include "proc.h" /* adapted from procps */ @@ -107,7 +111,7 @@ load_drivers (void) buf[bytes] = '\0'; p = buf; - while ((p = strstr (p, " /dev/"))){ + while ((p = strstr (p, " " _PATH_DEV))){ tty_map_node *tmn; int len; char *end; @@ -188,7 +192,7 @@ driver_name (guint maj, tmn = tmn->next; } - tty = g_strdup_printf ("/dev/%s%d", tmn->name, min); /* like "/dev/ttyZZ255" */ + tty = g_strdup_printf (_PATH_DEV "%s%d", tmn->name, min); /* like "/dev/ttyZZ255" */ if (stat (tty, &sbuf) < 0){ g_free (tty); @@ -196,7 +200,7 @@ driver_name (guint maj, return NULL; } - tty = g_strdup_printf ("/dev/%s", tmn->name); /* like "/dev/ttyZZ255" */ + tty = g_strdup_printf (_PATH_DEV "%s", tmn->name); /* like "/dev/ttyZZ255" */ if (stat (tty, &sbuf) < 0) { g_free (tty); -- cgit