UNIX_PATH_MAX too large for *BSD (#1267)

Stuart Henderson notifications at github.com
Sun Jun 29 00:59:27 CEST 2014


On OpenBSD:

```
netutils.c: In function 'np_net_connect':
netutils.c:237: warning: array size (104) smaller than bound length (108)
netutils.c:237: warning: array size (104) smaller than bound length (108)
```

This uses UNIX_PATH_MAX from the macro defined in netutils.h:

```
#ifdef HAVE_SYS_UN_H
# include <sys/un.h>
# ifndef UNIX_PATH_MAX
   /* linux uses this, on sun it's hard-coded at 108 without a define */
#  define UNIX_PATH_MAX 108
# endif /* UNIX_PATH_MAX */
#endif /* HAVE_SYS_UN_H */
```

On at least (Free|Net|Open)BSD, Dragonfly and Apple this is hard-coded at
104 bytes, see http://fxr.watson.org/fxr/search?string=sun_path

-- 
Reply to this email on GitHub:
https://github.com/monitoring-plugins/monitoring-plugins/issues/1267
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20140628/41b6b60f/attachment.html>


More information about the Devel mailing list