Skip to content
Snippets Groups Projects
  1. Apr 18, 2019
  2. Apr 12, 2019
  3. Feb 11, 2019
  4. Dec 22, 2018
  5. Sep 13, 2018
  6. Aug 19, 2018
  7. Jul 17, 2018
  8. May 11, 2018
  9. Mar 10, 2018
  10. Mar 09, 2018
  11. Mar 08, 2018
  12. Feb 14, 2018
  13. Jan 24, 2018
  14. Jan 17, 2018
  15. Dec 28, 2017
  16. Dec 27, 2017
  17. Dec 07, 2017
  18. Oct 27, 2017
  19. Sep 01, 2017
  20. Aug 24, 2017
  21. Feb 26, 2017
  22. Feb 23, 2017
  23. Feb 16, 2017
  24. Jan 11, 2017
  25. Aug 31, 2016
    • Birte Kristina Friesel's avatar
    • Niclas Zeising's avatar
      Only use sysconf() if HOST_NAME_MAX is undefined · 5ab630b5
      Niclas Zeising authored
      On some systsems sysconf() can return a very large value, unsuitable for
      use with malloc().  Only use sysconf() if HOST_NAME_MAX isn't avalable.
      5ab630b5
    • Niclas Zeising's avatar
      Fix build on FreeBSD. · 873c84f0
      Niclas Zeising authored
      FreeBSD lacks the constant HOST_NAME_MAX, instead using sysconf(3) to
      find out the value of the maximum host name length at run time.  Patch
      to use this instead of HOST_NAME_MAX.
      This brings with it the need to use malloc instead of using a statically
      sized buffer for the host name, since the size of the buffer cannot be
      known at run time.  Errors from sysconf or malloc just means that the
      entire block of code is skipped over (the same way it's skipped if the
      call to gethostname() fails), rather than returning any kind of error to
      the caller or logging an error message somewhere.
      873c84f0
  26. Aug 28, 2016
Loading