Commit Graph

7 Commits

Author SHA1 Message Date
Aurelien Jacobs df3b70a888 use readdir() instead of the deprecated readir_r()
readir() is threadsafe on both linux and freebsd anyway.
The rationale behind the readdir_r() deprecation is in the glibc manual:
https://www.gnu.org/software/libc/manual/html_node/Reading_002fClosing-Directory.html

This fixes the following warning with recent glibc:

linux.c: In function ‘list_ports’:
linux.c:197:2: warning: ‘readdir_r’ is deprecated [-Wdeprecated-declarations]
  while (!readdir_r(dir, &entry, &result) && result) {
  ^~~~~
2016-10-14 23:58:22 +02:00
Wolfram Sang 0c3f38b81b linux: freebsd: do check on proper pointer
We want to check here if we added something to the list, not if the
function argument was valid. Problem spotted by Coverity, CID 50754.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2016-02-28 18:01:25 +01:00
Daniel Elstner 1a584c45b0 Build: Include config.h first in all source files 2015-09-13 20:04:31 +02:00
Uwe Hermann dc422c04af Various cosmetic and consistency fixes. 2015-03-26 23:57:56 +01:00
Uwe Hermann 7c1101dc08 Fix misleading snprintf() arguments. 2015-02-20 18:57:08 +01:00
Uffe Jakobsen 5497520891 Handle enumeration of native UART ports on FreeBSD 2015-02-16 23:25:14 +01:00
Uffe Jakobsen ccd512d51c Implement FreeBSD OS-specific serial port detection and query 2015-02-15 21:28:15 +01:00