0006-Fix-compile-error-when-building-against-uclibc-or-mu.patch 1.3 KB

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