replace: fix build issues on GNU Hurd (#7998)

Andrew Bartlett abartlet at samba.org
Mon May 30 18:22:13 MDT 2011


On Mon, 2011-05-30 at 07:12 +0200, Kai Blin wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 2011-05-30 01:16, Andrew Bartlett wrote:
> 
> >> diff --git a/lib/replace/system/network.h b/lib/replace/system/network.h
> >> index f7c1bcf..2ec9ebd 100644
> >> --- a/lib/replace/system/network.h
> >> +++ b/lib/replace/system/network.h
> >> @@ -332,7 +332,7 @@ typedef unsigned short int sa_family_t;
> >>       */
> >>  #   define IOV_MAX 512
> >>  #  else
> >> -#   error IOV_MAX and UIO_MAXIOV undefined
> >> +#   warning IOV_MAX and UIO_MAXIOV undefined
> >>  #  endif
> >>  # endif
> >>  #endif
> > 
> > Is this really the right fix?  
> > 
> > Wouldn't this just shift the build failure to parts of Samba that rely
> > on IOV_MAX?
> 
> Nope. As far as I can see IOV_MAX is only used in tsocket, where it's
> inside an #ifdef and just loses the feature of checking if the iovec
> passed to the readv/writev call is too big.

In which case we probably don't want to put a warning on every C file
compiled with network.h (ie drop the #warning).

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org



More information about the samba-technical mailing list