---
apps/ircp/dirtraverse.c | 1 +
apps/ircp/ircp_client.c | 4 ++--
apps/obex_find.c | 3 +++
apps/obex_tcp.c | 1 +
apps/obex_test/obex_test_cable.c | 2 ++
apps/obex_test/obex_test_client.c | 1 +
6 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/apps/ircp/dirtraverse.c b/apps/ircp/dirtraverse.c
index f135bab..124fff4 100644
--- a/apps/ircp/dirtraverse.c
+++ b/apps/ircp/dirtraverse.c
@@ -1,6 +1,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#define _XOPEN_SOURCE 500
#include <stdio.h>
#include <string.h>
diff --git a/apps/ircp/ircp_client.c b/apps/ircp/ircp_client.c
index 1acd4a8..9035c2c 100644
--- a/apps/ircp/ircp_client.c
+++ b/apps/ircp/ircp_client.c
@@ -37,7 +37,7 @@
#ifdef _WIN32
#define getcwd(b,len) _getcwd(b,len)
#define chdir(s) _chdir(s)
-#define S_IFDIR _S_IFDIR
+#define S_ISDIR(x) ((x & _S_IFDIR) != 0)
#endif
#define TRUE 1
@@ -390,7 +390,7 @@ int ircp_put(ircp_client_t *cli, char *name)
}
/* This is a directory. CD into it */
- if(statbuf.st_mode & S_IFDIR) {
+ if(S_ISDIR(statbuf.st_mode)) {
char *newrealdir = NULL;
char *dirname;
diff --git a/apps/obex_find.c b/apps/obex_find.c
index b067b5e..598ce7d 100644
--- a/apps/obex_find.c
+++ b/apps/obex_find.c
@@ -18,6 +18,7 @@
* License along with OpenOBEX. If not, see <http://www.gnu.org/>.
*/
+#define _XOPEN_SOURCE 500
#include <openobex/obex.h>
#include <openobex/obex_const.h>
@@ -27,6 +28,8 @@
#ifdef _WIN32
#define strcasecmp _stricmp
+#else
+#include <strings.h>
#endif
static int verbose = 0;
diff --git a/apps/obex_tcp.c b/apps/obex_tcp.c
index c50a827..7fca284 100644
--- a/apps/obex_tcp.c
+++ b/apps/obex_tcp.c
@@ -22,6 +22,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#define _XOPEN_SOURCE 500
#ifdef _WIN32
#include <winsock2.h>
diff --git a/apps/obex_test/obex_test_cable.c b/apps/obex_test/obex_test_cable.c
index 0f4d827..0889ac6 100644
--- a/apps/obex_test/obex_test_cable.c
+++ b/apps/obex_test/obex_test_cable.c
@@ -22,6 +22,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#define _BSD_SOURCE
#include <openobex/obex.h>
@@ -40,6 +41,7 @@
#else
#include <sys/ioctl.h>
#include <sys/time.h>
+#include <strings.h>
#endif
#include "obex_test_cable.h"
diff --git a/apps/obex_test/obex_test_client.c
b/apps/obex_test/obex_test_client.c
index 739f04a..cd83ba3 100644
--- a/apps/obex_test/obex_test_client.c
+++ b/apps/obex_test/obex_test_client.c
@@ -22,6 +22,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#define _XOPEN_SOURCE 500
#include <openobex/obex.h>
--
1.7.5.3
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today.
http://p.sf.net/sfu/quest-dev2dev2
_______________________________________________
Openobex-users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/openobex-users