repositories
/
deb_libcec.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make liblockdev optional
[deb_libcec.git]
/
src
/
lib
/
platform
/
posix
/
serialport.cpp
diff --git
a/src/lib/platform/posix/serialport.cpp
b/src/lib/platform/posix/serialport.cpp
index 0089521caa370ae6a929f0a0f92459435da28416..f067ac45a873f42203755de6bd95cb9787fa9ce4 100644
(file)
--- a/
src/lib/platform/posix/serialport.cpp
+++ b/
src/lib/platform/posix/serialport.cpp
@@
-48,15
+48,17
@@
#define IUCLC 0
#endif
#else
#define IUCLC 0
#endif
#else
+#ifdef HAVE_LOCKDEV
#include <lockdev.h>
#endif
#include <lockdev.h>
#endif
+#endif
using namespace std;
using namespace PLATFORM;
inline bool RemoveLock(const char *strDeviceName)
{
using namespace std;
using namespace PLATFORM;
inline bool RemoveLock(const char *strDeviceName)
{
- #if !defined(__APPLE__) && !defined(__FreeBSD__)
+ #if !defined(__APPLE__) && !defined(__FreeBSD__)
&& defined(HAVE_LOCKDEV)
return dev_unlock(strDeviceName, 0) == 0;
#else
void *tmp = (void*)strDeviceName; // silence unused warning
return dev_unlock(strDeviceName, 0) == 0;
#else
void *tmp = (void*)strDeviceName; // silence unused warning
@@
-125,7
+127,7
@@
bool CSerialSocket::Open(uint64_t iTimeoutMs /* = 0 */)
return false;
}
return false;
}
- #if !defined(__APPLE__) && !defined(__FreeBSD__)
+ #if !defined(__APPLE__) && !defined(__FreeBSD__)
&& defined(HAVE_LOCKDEV)
if (dev_lock(m_strName.c_str()) != 0)
{
m_strError = "Couldn't lock the serial port";
if (dev_lock(m_strName.c_str()) != 0)
{
m_strError = "Couldn't lock the serial port";