cec: only target .net 2.0, include all the new stuff in the installer
[deb_libcec.git] / src / lib / AdapterDetection.cpp
index b304e43561d2eb5c0961a425b140b35bda88cd6a..1f96348f12fa7f175a922ce00af0e6f9e5b354b9 100644 (file)
@@ -31,8 +31,7 @@
  */
 
 #include "AdapterDetection.h"
-#include "platform/os-dependent.h"
-#include "util/StdString.h"
+#include "platform/os.h"
 
 #if defined(__APPLE__)
 #include <dirent.h>
 #include <IOKit/serial/IOSerialKeys.h>
 #include <CoreFoundation/CoreFoundation.h>
 #elif defined(__WINDOWS__)
+#pragma comment(lib, "advapi32.lib")
+#pragma comment(lib, "setupapi.lib")
 #include <setupapi.h>
 
 // the virtual COM port only shows up when requesting devices with the raw device guid!
 static GUID USB_RAW_GUID =  { 0xA5DCBF10, 0x6530, 0x11D2, { 0x90, 0x1F, 0x00, 0xC0, 0x4F, 0xB9, 0x51, 0xED } };
 #elif defined(HAVE_LIBUDEV)
 #include <dirent.h>
-#include <libudev.h>
 #include <poll.h>
+extern "C" {
+#include <libudev.h>
+}
 #endif
 
 #define CEC_VID 0x2548
@@ -322,5 +325,7 @@ uint8_t CAdapterDetection::FindAdapters(cec_adapter *deviceList, uint8_t iBufSiz
   }
 #endif
 
+  iBufSize = 0; /* silence "unused" warning on linux/osx */
+
   return iFound;
 }