* [PATCH iproute2] iproute2: fixes to compile on some systems.
@ 2017-11-20 3:57 Lorenzo Colitti
2017-11-20 18:41 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Lorenzo Colitti @ 2017-11-20 3:57 UTC (permalink / raw)
To: netdev; +Cc: stephen, Lorenzo Colitti
1. Put the declarations of strlcpy and strlcat inside
an #ifdef NEED_STRLCPY. Their declarations were already in a
similar #ifdef.
2. In bpf_scm.h, include sys/un.h for struct sockaddr_un.
3. In utils.h, include time.h for struct timeval.
Tested: builds on ubuntu 14.04 with "make clean distclean; ./configure && make -j64"
Tested: 4.14.1 builds on Android with Android-specific #ifndefs for missing library code
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
---
include/bpf_scm.h | 1 +
include/utils.h | 3 +++
2 files changed, 4 insertions(+)
diff --git a/include/bpf_scm.h b/include/bpf_scm.h
index 35117d11ee..122d59fc43 100644
--- a/include/bpf_scm.h
+++ b/include/bpf_scm.h
@@ -3,6 +3,7 @@
#include <sys/types.h>
#include <sys/socket.h>
+#include <sys/un.h>
#include "utils.h"
#include "bpf_elf.h"
diff --git a/include/utils.h b/include/utils.h
index 3d91c50db0..10749fbee1 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -6,6 +6,7 @@
#include <resolv.h>
#include <stdlib.h>
#include <stdbool.h>
+#include <time.h>
#include "libnetlink.h"
#include "ll_map.h"
@@ -256,7 +257,9 @@ int make_path(const char *path, mode_t mode);
char *find_cgroup2_mount(void);
int get_command_name(const char *pid, char *comm, size_t len);
+#ifdef NEED_STRLCPY
size_t strlcpy(char *dst, const char *src, size_t size);
size_t strlcat(char *dst, const char *src, size_t size);
+#endif
#endif /* __UTILS_H__ */
--
2.15.0.448.gf294e3d99a-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH iproute2] iproute2: fixes to compile on some systems.
2017-11-20 3:57 [PATCH iproute2] iproute2: fixes to compile on some systems Lorenzo Colitti
@ 2017-11-20 18:41 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2017-11-20 18:41 UTC (permalink / raw)
To: Lorenzo Colitti; +Cc: netdev
On Mon, 20 Nov 2017 12:57:07 +0900
Lorenzo Colitti <lorenzo@google.com> wrote:
> 1. Put the declarations of strlcpy and strlcat inside
> an #ifdef NEED_STRLCPY. Their declarations were already in a
> similar #ifdef.
> 2. In bpf_scm.h, include sys/un.h for struct sockaddr_un.
> 3. In utils.h, include time.h for struct timeval.
>
> Tested: builds on ubuntu 14.04 with "make clean distclean; ./configure && make -j64"
> Tested: 4.14.1 builds on Android with Android-specific #ifndefs for missing library code
> Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Applied. Thanks for not forking
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-20 18:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-20 3:57 [PATCH iproute2] iproute2: fixes to compile on some systems Lorenzo Colitti
2017-11-20 18:41 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).