The unified diff between revisions [c61008d6..] and [874259c2..] is displayed below. It can also be downloaded as a raw diff.
#
#
# patch "CMakeLists.txt"
# from [78742225b5b8ab63006a5fba774babcc9621f217]
# to [3a7a37f0632df3ba80cd4ecb9d3b710878a2ecb4]
#
# patch "fritz.cc"
# from [e6a588ee0d2b32cddd43b88ff96780d7198d47e2]
# to [b015a46adb5cebd0d847c8b2b7d271a9f17ea96d]
#
============================================================
--- CMakeLists.txt 78742225b5b8ab63006a5fba774babcc9621f217
+++ CMakeLists.txt 3a7a37f0632df3ba80cd4ecb9d3b710878a2ecb4
@@ -1,10 +1,23 @@
project (fritz.it)
+find_library (LIB_RT rt)
+find_library (LIB_DL dl)
+
add_executable (fritz_server fritz.cc fritz_server.cc)
-target_link_libraries (fritz_server rt dl)
+IF (LIB_RT)
+ target_link_libraries (fritz_server ${LIB_RT} dl)
+ENDIF (LIB_RT)
+IF (LIB_DL)
+ target_link_libraries (fritz_server ${LIB_DL} dl)
+ENDIF (LIB_DL)
add_library (fritz_client SHARED fritz_client.cc fritz.cc)
-target_link_libraries (fritz_client rt dl)
+IF (LIB_RT)
+ target_link_libraries (fritz_client ${LIB_RT} dl)
+ENDIF (LIB_RT)
+IF (LIB_DL)
+ target_link_libraries (fritz_client ${LIB_DL} dl)
+ENDIF (LIB_DL)
add_executable (fritz_this fritz_this.cc)
============================================================
--- fritz.cc e6a588ee0d2b32cddd43b88ff96780d7198d47e2
+++ fritz.cc b015a46adb5cebd0d847c8b2b7d271a9f17ea96d
@@ -76,7 +76,7 @@ Fritzer::open_semaphore (const char *nam
sem_t *rv;
rv = sem_open (name, 0);
- if ((rv == SEM_FAILED) || (!rv)) {
+ if ((rv == (sem_t *)SEM_FAILED) || (!rv)) {
throw fritz_exception ("Unable top open semaphore.");
}
return rv;
@@ -90,7 +90,7 @@ Fritzer::create_semaphore (const char *n
/* a bit brutal */
sem_unlink (name);
rv = sem_open (name, O_CREAT|O_EXCL, 0600, 0);
- if ((rv == SEM_FAILED) || (!rv)) {
+ if ((rv == (sem_t *)SEM_FAILED) || (!rv)) {
throw fritz_exception ("Unable to create semaphore.");
}
return rv;