netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* iproute2 won't compile without AF_VSOCK
@ 2018-06-19 15:17 Steve Wise
  2018-06-19 15:47 ` Stephen Hemminger
  0 siblings, 1 reply; 5+ messages in thread
From: Steve Wise @ 2018-06-19 15:17 UTC (permalink / raw)
  To: David Ahern; +Cc: netdev

Hey David,

I'm trying to compile the latest iproute2 on an RHEL-7.3 distro, and it
fails to compile because AF_VSOCK is not defined.  Should this
functionality be a configure option to disable it on older distros?


Thanks,

Steve.

----

misc
    CC       ss.o
ss.c:301:27: error: ‘AF_VSOCK’ undeclared here (not in a function)
   .families = FAMILY_MASK(AF_VSOCK),
                           ^
ss.c:252:46: note: in definition of macro ‘FAMILY_MASK’
 #define FAMILY_MASK(family) ((uint64_t)1 << (family))
                                              ^
ss.c:334:2: error: array index in initializer not of integer type
  [AF_VSOCK] = {
  ^
ss.c:334:2: error: (near initialization for ‘default_afs’)
make[1]: *** [ss.o] Error 1
make: *** [all] Error 2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: iproute2 won't compile without AF_VSOCK
  2018-06-19 15:17 iproute2 won't compile without AF_VSOCK Steve Wise
@ 2018-06-19 15:47 ` Stephen Hemminger
  2018-06-19 20:27   ` David Ahern
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2018-06-19 15:47 UTC (permalink / raw)
  To: Steve Wise; +Cc: David Ahern, netdev

On Tue, 19 Jun 2018 10:17:45 -0500
Steve Wise <swise@opengridcomputing.com> wrote:

> Hey David,
> 
> I'm trying to compile the latest iproute2 on an RHEL-7.3 distro, and it
> fails to compile because AF_VSOCK is not defined.  Should this
> functionality be a configure option to disable it on older distros?
> 
> 
> Thanks,
> 
> Steve.
> 
> ----
> 
> misc
>     CC       ss.o
> ss.c:301:27: error: ‘AF_VSOCK’ undeclared here (not in a function)
>    .families = FAMILY_MASK(AF_VSOCK),
>                            ^
> ss.c:252:46: note: in definition of macro ‘FAMILY_MASK’
>  #define FAMILY_MASK(family) ((uint64_t)1 << (family))
>                                               ^
> ss.c:334:2: error: array index in initializer not of integer type
>   [AF_VSOCK] = {
>   ^
> ss.c:334:2: error: (near initialization for ‘default_afs’)
> make[1]: *** [ss.o] Error 1
> make: *** [all] Error 2
> 

Probably should just add an #ifdef to takeout that if not present

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: iproute2 won't compile without AF_VSOCK
  2018-06-19 15:47 ` Stephen Hemminger
@ 2018-06-19 20:27   ` David Ahern
  2018-06-19 20:29     ` David Ahern
  0 siblings, 1 reply; 5+ messages in thread
From: David Ahern @ 2018-06-19 20:27 UTC (permalink / raw)
  To: Stephen Hemminger, Steve Wise; +Cc: netdev

On 6/19/18 9:47 AM, Stephen Hemminger wrote:
> On Tue, 19 Jun 2018 10:17:45 -0500
> Steve Wise <swise@opengridcomputing.com> wrote:
> 
>> Hey David,
>>
>> I'm trying to compile the latest iproute2 on an RHEL-7.3 distro, and it
>> fails to compile because AF_VSOCK is not defined.  Should this
>> functionality be a configure option to disable it on older distros?
>>
>>
>> Thanks,
>>
>> Steve.
>>
>> ----
>>
>> misc
>>     CC       ss.o
>> ss.c:301:27: error: ‘AF_VSOCK’ undeclared here (not in a function)
>>    .families = FAMILY_MASK(AF_VSOCK),
>>                            ^
>> ss.c:252:46: note: in definition of macro ‘FAMILY_MASK’
>>  #define FAMILY_MASK(family) ((uint64_t)1 << (family))
>>                                               ^
>> ss.c:334:2: error: array index in initializer not of integer type
>>   [AF_VSOCK] = {
>>   ^
>> ss.c:334:2: error: (near initialization for ‘default_afs’)
>> make[1]: *** [ss.o] Error 1
>> make: *** [all] Error 2
>>
> 
> Probably should just add an #ifdef to takeout that if not present
> 

Most userspace tools have a compat header for cases like this.

#ifndef AF_VSOCK
#define AF_VSOCK 	40
#endif

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: iproute2 won't compile without AF_VSOCK
  2018-06-19 20:27   ` David Ahern
@ 2018-06-19 20:29     ` David Ahern
  2018-06-19 20:41       ` Steve Wise
  0 siblings, 1 reply; 5+ messages in thread
From: David Ahern @ 2018-06-19 20:29 UTC (permalink / raw)
  To: Stephen Hemminger, Steve Wise; +Cc: netdev

On 6/19/18 2:27 PM, David Ahern wrote:
> On 6/19/18 9:47 AM, Stephen Hemminger wrote:
>> On Tue, 19 Jun 2018 10:17:45 -0500
>> Steve Wise <swise@opengridcomputing.com> wrote:
>>
>>> Hey David,
>>>
>>> I'm trying to compile the latest iproute2 on an RHEL-7.3 distro, and it
>>> fails to compile because AF_VSOCK is not defined.  Should this
>>> functionality be a configure option to disable it on older distros?
>>>
>>>
>>> Thanks,
>>>
>>> Steve.
>>>
>>> ----
>>>
>>> misc
>>>     CC       ss.o
>>> ss.c:301:27: error: ‘AF_VSOCK’ undeclared here (not in a function)
>>>    .families = FAMILY_MASK(AF_VSOCK),
>>>                            ^
>>> ss.c:252:46: note: in definition of macro ‘FAMILY_MASK’
>>>  #define FAMILY_MASK(family) ((uint64_t)1 << (family))
>>>                                               ^
>>> ss.c:334:2: error: array index in initializer not of integer type
>>>   [AF_VSOCK] = {
>>>   ^
>>> ss.c:334:2: error: (near initialization for ‘default_afs’)
>>> make[1]: *** [ss.o] Error 1
>>> make: *** [all] Error 2
>>>
>>
>> Probably should just add an #ifdef to takeout that if not present
>>
> 
> Most userspace tools have a compat header for cases like this.
> 
> #ifndef AF_VSOCK
> #define AF_VSOCK 	40
> #endif
> 

Add the above to include//utils.h; AF_MPLS is already there.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: iproute2 won't compile without AF_VSOCK
  2018-06-19 20:29     ` David Ahern
@ 2018-06-19 20:41       ` Steve Wise
  0 siblings, 0 replies; 5+ messages in thread
From: Steve Wise @ 2018-06-19 20:41 UTC (permalink / raw)
  To: David Ahern, Stephen Hemminger; +Cc: netdev



On 6/19/2018 3:29 PM, David Ahern wrote:
> On 6/19/18 2:27 PM, David Ahern wrote:
>> On 6/19/18 9:47 AM, Stephen Hemminger wrote:
>>> On Tue, 19 Jun 2018 10:17:45 -0500
>>> Steve Wise <swise@opengridcomputing.com> wrote:
>>>
>>>> Hey David,
>>>>
>>>> I'm trying to compile the latest iproute2 on an RHEL-7.3 distro, and it
>>>> fails to compile because AF_VSOCK is not defined.  Should this
>>>> functionality be a configure option to disable it on older distros?
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Steve.
>>>>
>>>> ----
>>>>
>>>> misc
>>>>     CC       ss.o
>>>> ss.c:301:27: error: ‘AF_VSOCK’ undeclared here (not in a function)
>>>>    .families = FAMILY_MASK(AF_VSOCK),
>>>>                            ^
>>>> ss.c:252:46: note: in definition of macro ‘FAMILY_MASK’
>>>>  #define FAMILY_MASK(family) ((uint64_t)1 << (family))
>>>>                                               ^
>>>> ss.c:334:2: error: array index in initializer not of integer type
>>>>   [AF_VSOCK] = {
>>>>   ^
>>>> ss.c:334:2: error: (near initialization for ‘default_afs’)
>>>> make[1]: *** [ss.o] Error 1
>>>> make: *** [all] Error 2
>>>>
>>> Probably should just add an #ifdef to takeout that if not present
>>>
>> Most userspace tools have a compat header for cases like this.
>>
>> #ifndef AF_VSOCK
>> #define AF_VSOCK 	40
>> #endif
>>
> Add the above to include//utils.h; AF_MPLS is already there.

I'll send out a patch.

Thanks,

Steve.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-06-19 20:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-19 15:17 iproute2 won't compile without AF_VSOCK Steve Wise
2018-06-19 15:47 ` Stephen Hemminger
2018-06-19 20:27   ` David Ahern
2018-06-19 20:29     ` David Ahern
2018-06-19 20:41       ` Steve Wise

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).