diff --git a/app/nginx-1.16.1/src/event/modules/ngx_ff_module.c b/app/nginx-1.16.1/src/event/modules/ngx_ff_module.c index c74afff68..4ddd79e95 100644 --- a/app/nginx-1.16.1/src/event/modules/ngx_ff_module.c +++ b/app/nginx-1.16.1/src/event/modules/ngx_ff_module.c @@ -545,6 +545,11 @@ kevent(int kq, const struct kevent *changelist, int nchanges, return ff_kevent(kq, changelist, nchanges, eventlist, nevents, timeout); } +/* + * It is need to modify the definition, such as Ubuntu 22.04 or later. + * + * int(struct timeval * restrict, void * restrict) + */ int gettimeofday(struct timeval *tv, struct timezone *tz) { diff --git a/freebsd/kern/kern_linker.c b/freebsd/kern/kern_linker.c index e54546eec..2fb07a4f6 100644 --- a/freebsd/kern/kern_linker.c +++ b/freebsd/kern/kern_linker.c @@ -771,7 +771,7 @@ linker_file_add_dependency(linker_file_t file, linker_file_t dep) file->deps[file->ndeps] = dep; file->ndeps++; KLD_DPF(FILE, ("linker_file_add_dependency:" - " adding %s as dependency for %s\n", + " adding %s as dependency for %s\n", dep->filename, file->filename)); return (0); } @@ -1862,7 +1862,11 @@ linker_hints_lookup(const char *path, int pathlen, const char *modname, goto bad; best = cp = NULL; error = VOP_GETATTR(nd.ni_vp, &vattr, cred); +#ifdef FSTACK + if (error || vattr.va_size == 0) +#else if (error) +#endif goto bad; /* * XXX: we need to limit this number to some reasonable value diff --git a/freebsd/netinet/in_mcast.c b/freebsd/netinet/in_mcast.c index 6d390a0b2..97214d6d7 100644 --- a/freebsd/netinet/in_mcast.c +++ b/freebsd/netinet/in_mcast.c @@ -760,7 +760,11 @@ imf_get_source(struct in_mfilter *imf, const struct sockaddr_in *psin, if (lims == NULL) { if (imf->imf_nsrc == in_mcast_maxsocksrc) return (ENOSPC); +#ifdef FSTACK + nims = malloc(sizeof(struct ip_msource), M_INMFILTER, +#else nims = malloc(sizeof(struct in_msource), M_INMFILTER, +#endif M_NOWAIT | M_ZERO); if (nims == NULL) return (ENOMEM); @@ -791,7 +795,11 @@ imf_graft(struct in_mfilter *imf, const uint8_t st1, struct ip_msource *nims; struct in_msource *lims; +#ifdef FSTACK + nims = malloc(sizeof(struct ip_msource), M_INMFILTER, +#else nims = malloc(sizeof(struct in_msource), M_INMFILTER, +#endif M_NOWAIT | M_ZERO); if (nims == NULL) return (NULL); diff --git a/freebsd/netinet6/in6_mcast.c b/freebsd/netinet6/in6_mcast.c index 9b04c87d2..75dba103f 100644 --- a/freebsd/netinet6/in6_mcast.c +++ b/freebsd/netinet6/in6_mcast.c @@ -729,7 +729,11 @@ im6f_get_source(struct in6_mfilter *imf, const struct sockaddr_in6 *psin, if (lims == NULL) { if (imf->im6f_nsrc == in6_mcast_maxsocksrc) return (ENOSPC); +#ifdef FSTACK + nims = malloc(sizeof(struct ip6_msource), M_IN6MFILTER, +#else nims = malloc(sizeof(struct in6_msource), M_IN6MFILTER, +#endif M_NOWAIT | M_ZERO); if (nims == NULL) return (ENOMEM); @@ -760,7 +764,11 @@ im6f_graft(struct in6_mfilter *imf, const uint8_t st1, struct ip6_msource *nims; struct in6_msource *lims; +#ifdef FSTACK + nims = malloc(sizeof(struct ip6_msource), M_IN6MFILTER, +#else nims = malloc(sizeof(struct in6_msource), M_IN6MFILTER, +#endif M_NOWAIT | M_ZERO); if (nims == NULL) return (NULL);