> From: Jeremie Courreges-Anglas <j...@wxcvbn.org>
> Date: Mon, 26 Sep 2016 22:19:54 +0200
> 
> Mark Kettenis <mark.kette...@xs4all.nl> writes:
> 
> >> From: j...@wxcvbn.org (Jeremie Courreges-Anglas)
> >> Date: Mon, 26 Sep 2016 21:13:24 +0200
> >> 
> >> AFAIK this is not a standard define, so it should be unconditionally
> >> reachable.  mkr went fine.
> >> 
> >> Thoughts?
> >
> > ok kettenis@, although perhaps it makes sense to move this #define a
> > bit further down the file into an existing __BSD_VISIBLE block.
> 
> Yeah, but I didn't know where to move it.  What about the following?

That's probably the wrong block ;) SOCK_CLOEXEC is likely to end up in
the next POSIX standard, which means we'll have to shuffle around the
#if __BSD_VISIBLE.

I'd put it right after the "struct splice" declaration, with a blank
line before and after.

> Index: socket.h
> ===================================================================
> RCS file: /cvs/src/sys/sys/socket.h,v
> retrieving revision 1.91
> diff -u -p -p -u -r1.91 socket.h
> --- socket.h  12 Sep 2016 19:41:20 -0000      1.91
> +++ socket.h  26 Sep 2016 20:15:49 -0000
> @@ -57,9 +57,6 @@ typedef     __sa_family_t   sa_family_t;    /* so
>   * Definitions related to sockets: types, address families, options.
>   */
>  
> -/* Maximum number of alternate routing tables */
> -#define      RT_TABLEID_MAX  255
> -
>  /*
>   * Types
>   */
> @@ -72,16 +69,20 @@ typedef   __sa_family_t   sa_family_t;    /* so
>  #define      SOCK_TYPE_MASK  0x000F          /* mask that covers the above */
>  #endif
>  
> +#if __BSD_VISIBLE
>  /*
>   * Socket creation flags
>   */
> -#if __BSD_VISIBLE
>  #define      SOCK_CLOEXEC            0x8000  /* set FD_CLOEXEC */
>  #define      SOCK_NONBLOCK           0x4000  /* set O_NONBLOCK */
>  #ifdef _KERNEL
>  #define      SOCK_NONBLOCK_INHERIT   0x2000  /* inherit O_NONBLOCK from 
> listener */
>  #endif
>  #define      SOCK_DNS                0x1000  /* set SS_DNS */
> +/*
> + * Maximum number of alternate routing tables
> + */
> +#define      RT_TABLEID_MAX  255
>  #endif /* __BSD_VISIBLE */
>  
>  /*
> 
> -- 
> jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE
> 

Reply via email to