1From 096e33743158e0e8c04d60d01cc66e2945d79777 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Tue, 27 Nov 2018 16:52:35 +0800
4Subject: [PATCH] From 557ca399f4b3a397f20bb147ec6dc4ab9732dd1e Mon Sep 17
5 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 31 Mar 2017
6 19:12:10 -0700 Subject: [PATCH] Replace __S_IEXEC with S_IEXEC
7
8S_IEXEC is portable
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11
12update patch to version 5.1.5
13Signed-off-by: Changqing Li <changqing.li@windriver.com>
14---
15 daemon/lookup.c        | 6 +++---
16 modules/lookup_multi.c | 2 +-
17 2 files changed, 4 insertions(+), 4 deletions(-)
18
19--- a/daemon/lookup.c
20+++ b/daemon/lookup.c
21@@ -397,7 +397,7 @@ static int read_file_source_instance(str
22 		return NSS_STATUS_NOTFOUND;
23 	}
24
25-	if (st.st_mode & __S_IEXEC)
26+	if (st.st_mode & S_IEXEC)
27 		type = src_prog;
28 	else
29 		type = src_file;
30@@ -930,7 +930,7 @@ static int lookup_name_file_source_insta
31 		return NSS_STATUS_NOTFOUND;
32 	}
33
34-	if (st.st_mode & __S_IEXEC)
35+	if (st.st_mode & S_IEXEC)
36 		type = src_prog;
37 	else
38 		type = src_file;
39@@ -1077,7 +1077,7 @@ static struct map_source *lookup_get_map
40 	if (!S_ISREG(st.st_mode))
41 		return NULL;
42
43-	if (st.st_mode & __S_IEXEC)
44+	if (st.st_mode & S_IEXEC)
45 		type = "program";
46 	else
47 		type = "file";
48--- a/modules/lookup_multi.c
49+++ b/modules/lookup_multi.c
50@@ -247,7 +247,7 @@ static struct lookup_mod *nss_open_looku
51 				continue;
52 			}
53
54-			if (st.st_mode & __S_IEXEC)
55+			if (st.st_mode & S_IEXEC)
56 				type = src_prog;
57 			else
58 				type = src_file;
59