aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dma.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dma.c b/dma.c
index b87b20245583..e643e0f4ac9b 100644
--- a/dma.c
+++ b/dma.c
@@ -47,6 +47,7 @@
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
+#include <libgen.h>
#include <paths.h>
#include <pwd.h>
#include <signal.h>
@@ -457,7 +458,7 @@ main(int argc, char **argv)
bzero(&queue, sizeof(queue));
LIST_INIT(&queue.queue);
- if (strcmp(argv[0], "mailq") == 0) {
+ if (strcmp(basename(argv[0]), "mailq") == 0) {
argv++; argc--;
showq = 1;
if (argc != 0)