aio/unix: Use signal.sival which is standard

Sepherosa Ziehau sepherosa at gmail.com
Thu Jan 24 02:04:09 UTC 2019


On Fri, Jan 18, 2019 at 6:22 PM Sergey Kandaurov <pluknet at nginx.com> wrote:
>
>
>
> > On 18 Jan 2019, at 10:39, Sepherosa Ziehau <sepherosa at gmail.com> wrote:
> >
> > Hi,
> >
> >> diff --git a/src/os/unix/ngx_freebsd_config.h b/src/os/unix/ngx_freebsd_config.h
> >> --- a/src/os/unix/ngx_freebsd_config.h
> >> +++ b/src/os/unix/ngx_freebsd_config.h
> >> @@ -91,6 +91,10 @@
> >> #if (NGX_HAVE_FILE_AIO)
> >> #include <aio.h>
> >> typedef struct aiocb  ngx_aiocb_t;
> >> +
> >> +#if (__FreeBSD_version < 700005 && !defined __DragonFly__)
> >> +#define sival_ptr                 sigval_ptr
> >> +#endif
> >> #endif
> >
> > Will the following code be more straightforward?
> > #if defined(__FreeBSD__) && (__FreeBSD_version < 700005)
> > #define sival_ptr sigval_ptr
> > #endif
>
> This won't work.  __FreeBSD__ and__FreeBSD_version
> are defined for DragonFly in src/core/ngx_config.h.

Aha, I see.  Thank you.


-- 
Tomorrow Will Never Die


More information about the nginx-devel mailing list