packages/net/sysrepo/patches/005-fix-struct-ucred-define
Mislav Novakovic 8f2dd7dbb7 sysrepo: update the sysrepo/netopeer2 stack
Patch includes updates to packages:
netopeer2: update to version 0.4.0
sysrepo: update to 0.7.0
libnetconf2: update to 0.9.15
libyang: update to 0.13.46

Signed-off-by: Mislav Novakovic <mislav.novakovic@sartura.hr>
2017-09-18 12:00:38 +02:00

30 lines
1.2 KiB
Text

Index: sysrepo-0.7.0-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sr_utils.c
===================================================================
--- sysrepo-0.7.0-7aa2f18d234267403147df92c0005c871f0aa840.orig/src/common/sr_utils.c
+++ sysrepo-0.7.0-7aa2f18d234267403147df92c0005c871f0aa840/src/common/sr_utils.c
@@ -460,14 +460,24 @@ sr_fd_set_nonblock(int fd)
#if defined(SO_PEERCRED)
+#if defined(__GLIBC__)
#if !defined(SCM_CREDENTIALS)
-/* struct ucred is ifdefined behind __USE_GNU, but __USE_GNU is not defined */
struct ucred {
pid_t pid; /* process ID of the sending process */
uid_t uid; /* user ID of the sending process */
gid_t gid; /* group ID of the sending process */
};
#endif /* !defined(SCM_CREDENTIALS) */
+#else
+#if !defined(__USE_GNU)
+struct ucred {
+ pid_t pid; /* process ID of the sending process */
+ uid_t uid; /* user ID of the sending process */
+ gid_t gid; /* group ID of the sending process */
+};
+/* struct ucred is ifdefined behind __USE_GNU, but __USE_GNU is not defined */
+#endif /* !defined(__USE_GNU) */
+#endif /* defined(__GLIBC__) */
int
sr_get_peer_eid(int fd, uid_t *uid, gid_t *gid)