extern "C" {
#include <libudev.h>
}
+#elif defined(__FreeBSD__)
+#include <stdio.h>
+#include <unistd.h>
#endif
#define CEC_VID 0x2548
RegCloseKey(hDeviceKey);
}
+#elif defined(__FreeBSD__)
+ char devicePath[PATH_MAX + 1];
+ int i;
+
+ for (i = 0; i < 8; ++i)
+ {
+ (void)snprintf(devicePath, sizeof(devicePath), "/dev/ttyU%d", i);
+ if (!access(devicePath, 0))
+ {
+ snprintf(deviceList[iFound].path, sizeof(deviceList[iFound].path), "%s", devicePath);
+ snprintf(deviceList[iFound].comm, sizeof(deviceList[iFound].path), "%s", devicePath);
+ ++iFound;
+ }
+ }
#endif
iBufSize = 0; /* silence "unused" warning on linux/osx */