* [PATCH wpan-tools] build: avoid redefinition errors with libnl >= 3.2.27
@ 2015-11-09 18:10 Stefan Schmidt
2015-11-09 20:19 ` Alexander Aring
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Schmidt @ 2015-11-09 18:10 UTC (permalink / raw)
To: linux-wpan; +Cc: Alexander Aring, Stefan Schmidt
From 3.2.17 onwards we have nla for s8, s16, etc defined directly in libnl.
If we keep including this file anyway we run into redefinition errors. Better
include use our own only for earlier versions.
Happened to me on Fedora 22 after my last update.
Signed-off-by: Stefan Schmidt <stefan@osg.samsung.com>
---
| 4 ++++
1 file changed, 4 insertions(+)
--git a/src/nl_extras.h b/src/nl_extras.h
index 9d841aa..c4d1d14 100644
--- a/src/nl_extras.h
+++ b/src/nl_extras.h
@@ -1,6 +1,8 @@
#ifndef __NL_EXTRAS_H
#define __NL_EXTRAS_H
+#if LIBNL_VER_MIC <= 26
+
#ifndef NLA_S8
#define NLA_S8 13
@@ -43,4 +45,6 @@ static inline int32_t nla_get_s32(struct nlattr *nla)
#endif /* NLA_S64 */
+#endif /* LIBNL_VER_MIC */
+
#endif /* __NL_EXTRAS_H */
--
2.4.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH wpan-tools] build: avoid redefinition errors with libnl >= 3.2.27
2015-11-09 18:10 [PATCH wpan-tools] build: avoid redefinition errors with libnl >= 3.2.27 Stefan Schmidt
@ 2015-11-09 20:19 ` Alexander Aring
2015-11-09 21:11 ` Stefan Schmidt
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Aring @ 2015-11-09 20:19 UTC (permalink / raw)
To: Stefan Schmidt; +Cc: linux-wpan
Hi,
On Mon, Nov 09, 2015 at 07:10:42PM +0100, Stefan Schmidt wrote:
> From 3.2.17 onwards we have nla for s8, s16, etc defined directly in libnl.
> If we keep including this file anyway we run into redefinition errors. Better
> include use our own only for earlier versions.
>
> Happened to me on Fedora 22 after my last update.
>
> Signed-off-by: Stefan Schmidt <stefan@osg.samsung.com>
Acked-by: Alexander Aring <alex.aring@gmail.com>
I wonder how could that be when I do #ifndef on each declaration. So I
was in the hope to avoid such issues....
- Alex
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH wpan-tools] build: avoid redefinition errors with libnl >= 3.2.27
2015-11-09 20:19 ` Alexander Aring
@ 2015-11-09 21:11 ` Stefan Schmidt
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Schmidt @ 2015-11-09 21:11 UTC (permalink / raw)
To: Alexander Aring; +Cc: linux-wpan
Hello.
On 09/11/15 21:19, Alexander Aring wrote:
> Hi,
>
> On Mon, Nov 09, 2015 at 07:10:42PM +0100, Stefan Schmidt wrote:
>> From 3.2.17 onwards we have nla for s8, s16, etc defined directly in libnl.
>> If we keep including this file anyway we run into redefinition errors. Better
>> include use our own only for earlier versions.
>>
>> Happened to me on Fedora 22 after my last update.
>>
>> Signed-off-by: Stefan Schmidt <stefan@osg.samsung.com>
> Acked-by: Alexander Aring <alex.aring@gmail.com>
Thanks. Pushed.
> I wonder how could that be when I do #ifndef on each declaration. So I
> was in the hope to avoid such issues....
>
Longer term we should just bump our dependency to 3.2.27 and remove our
own defines here. I just avoided that for now as the release is to new
and we should wait for distros to adopt it first. Maybe in 6 months from
now we can do that.
regards
Stefan Schmidt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-09 21:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-09 18:10 [PATCH wpan-tools] build: avoid redefinition errors with libnl >= 3.2.27 Stefan Schmidt
2015-11-09 20:19 ` Alexander Aring
2015-11-09 21:11 ` Stefan Schmidt
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).