Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | From df1d56d6b6a6b15d0137619eb8a4b623de6c9633 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Fri, 16 Jun 2017 22:28:59 -0700 |
| 4 | Subject: [PATCH 6/6] tools: Add missing includes and use realpath() instead of |
| 5 | canonicalize_file_name |
| 6 | |
| 7 | Upstream-Status: Pending |
| 8 | |
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 10 | --- |
| 11 | tools/ssieventmonitor.cpp | 6 ++++-- |
| 12 | 1 file changed, 4 insertions(+), 2 deletions(-) |
| 13 | |
| 14 | diff --git a/tools/ssieventmonitor.cpp b/tools/ssieventmonitor.cpp |
| 15 | index 0553386..f04b8f0 100644 |
| 16 | --- a/tools/ssieventmonitor.cpp |
| 17 | +++ b/tools/ssieventmonitor.cpp |
| 18 | @@ -18,7 +18,9 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| 19 | #include <unistd.h> |
| 20 | #include <dirent.h> |
| 21 | #include <errno.h> |
| 22 | -#include <sys/fcntl.h> |
| 23 | +#include <limits.h> |
| 24 | +#include <fcntl.h> |
| 25 | +#include <libgen.h> |
| 26 | #include <sys/select.h> |
| 27 | #include <sys/wait.h> |
| 28 | #include <sys/inotify.h> |
| 29 | @@ -99,7 +101,7 @@ static int _exec_ssimsg(void) |
| 30 | int status; |
| 31 | switch (pid) { |
| 32 | case 0: { |
| 33 | - cp = canonicalize_file_name("/proc/self/exe"); |
| 34 | + cp = realpath("/proc/self/exe", NULL); |
| 35 | if (cp) { |
| 36 | strcpy(buffer, cp); |
| 37 | free(cp); |
| 38 | -- |
| 39 | 2.13.1 |
| 40 | |