1*4882a593SmuzhiyunFrom dc2f54097da3cd493b8f4d06a14ef40be484d24f Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Sergio Prado <sergio.prado@e-labworks.com>
3*4882a593SmuzhiyunDate: Thu, 21 Feb 2019 15:02:08 -0300
4*4882a593SmuzhiyunSubject: [PATCH] Fix compile error when building against uclibc or musl
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunThe build fails when dereferencing the rpcent structure with uclibc or musl C libraries.
7*4882a593Smuzhiyun
8*4882a593Smuzhiyun../../../src/dynamic-preprocessors/appid/service_plugins/service_rpc.c:241:20:
9*4882a593Smuzhiyunerror: dereferencing pointer to incomplete type ‘struct rpcent’
10*4882a593Smuzhiyun             if (rpc->r_name)
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunThat's because rpc.h should be included when using these C libraries.
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunSigned-off-by: Sergio Prado <sergio.prado@e-labworks.com>
15*4882a593Smuzhiyun---
16*4882a593Smuzhiyun src/dynamic-preprocessors/appid/service_plugins/service_rpc.c | 2 +-
17*4882a593Smuzhiyun 1 file changed, 1 insertion(+), 1 deletion(-)
18*4882a593Smuzhiyun
19*4882a593Smuzhiyundiff --git a/src/dynamic-preprocessors/appid/service_plugins/service_rpc.c b/src/dynamic-preprocessors/appid/service_plugins/service_rpc.c
20*4882a593Smuzhiyunindex 81bc8a5db8ab..2e45246083a8 100644
21*4882a593Smuzhiyun--- a/src/dynamic-preprocessors/appid/service_plugins/service_rpc.c
22*4882a593Smuzhiyun+++ b/src/dynamic-preprocessors/appid/service_plugins/service_rpc.c
23*4882a593Smuzhiyun@@ -32,7 +32,7 @@
24*4882a593Smuzhiyun #include "flow.h"
25*4882a593Smuzhiyun #include "service_api.h"
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun-#if defined(FREEBSD) || defined(OPENBSD)
28*4882a593Smuzhiyun+#if defined(FREEBSD) || defined(OPENBSD) || (defined(LINUX) && defined(__UCLIBC__) && !defined(__UCLIBC_HAS_RPC__) || !defined(__GLIBC__))
29*4882a593Smuzhiyun #include "rpc/rpc.h"
30*4882a593Smuzhiyun #endif
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun--
33*4882a593Smuzhiyun2.7.4
34*4882a593Smuzhiyun
35