blob: a7b70e3f492a6e71f45f98cc5f902dcb3af26cd6 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From df1d56d6b6a6b15d0137619eb8a4b623de6c9633 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 16 Jun 2017 22:28:59 -0700
4Subject: [PATCH 6/6] tools: Add missing includes and use realpath() instead of
5 canonicalize_file_name
6
7Upstream-Status: Pending
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 tools/ssieventmonitor.cpp | 6 ++++--
12 1 file changed, 4 insertions(+), 2 deletions(-)
13
14diff --git a/tools/ssieventmonitor.cpp b/tools/ssieventmonitor.cpp
15index 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--
392.13.1
40