summaryrefslogtreecommitdiff
path: root/comms/obexftp/patches
diff options
context:
space:
mode:
authorxtraeme <xtraeme>2006-07-24 17:07:15 +0000
committerxtraeme <xtraeme>2006-07-24 17:07:15 +0000
commitc1beba8256d43c342b8916f17e811ca2d69ba2ca (patch)
tree68a7d27c3a36d3ce8895131602fe86cebee9b8be /comms/obexftp/patches
parent1ce2246ead7644b87b08d5da802db3c94e269f57 (diff)
downloadpkgsrc-c1beba8256d43c342b8916f17e811ca2d69ba2ca.tar.gz
Merge in patches to make this build again on NetBSD without bluetooth,
thanks to dillo for that.
Diffstat (limited to 'comms/obexftp/patches')
-rw-r--r--comms/obexftp/patches/patch-ai67
-rw-r--r--comms/obexftp/patches/patch-ak22
-rw-r--r--comms/obexftp/patches/patch-al20
3 files changed, 100 insertions, 9 deletions
diff --git a/comms/obexftp/patches/patch-ai b/comms/obexftp/patches/patch-ai
index 512e96ee7f7..5270237fbb6 100644
--- a/comms/obexftp/patches/patch-ai
+++ b/comms/obexftp/patches/patch-ai
@@ -1,7 +1,7 @@
-$NetBSD: patch-ai,v 1.1 2006/07/17 12:29:57 xtraeme Exp $
+$NetBSD: patch-ai,v 1.2 2006/07/24 17:07:15 xtraeme Exp $
---- apps/obexftpd.c.orig 2006-07-09 16:43:20.000000000 +0200
-+++ apps/obexftpd.c 2006-07-09 16:45:04.000000000 +0200
+--- apps/obexftpd.c.orig 2006-04-13 07:57:55.000000000 +0200
++++ apps/obexftpd.c
@@ -23,6 +23,10 @@
* Created at: Don, 2 Okt 2003
*/
@@ -28,3 +28,64 @@ $NetBSD: patch-ai,v 1.1 2006/07/17 12:29:57 xtraeme Exp $
/* just until there is a server layer in obexftp */
#include <openobex/obex.h>
+@@ -934,16 +946,21 @@ static void start_server(int transport)
+ exit(0);
+ }
+
+- if (transport==OBEX_TRANS_BLUETOOTH && 0 > obexftp_sdp_register())
+- {
+- //OBEX_Cleanup(handle);
+- fprintf(stderr, "register to SDP Server failed.\n");
+- exit(0);
+- }
+- else
+- {
+- use_sdp = 1;
+- }
++#ifdef HAVE_BLUETOOTH
++ if (transport==OBEX_TRANS_BLUETOOTH)
++ {
++ if (0 > obexftp_sdp_register())
++ {
++ //OBEX_Cleanup(handle);
++ fprintf(stderr, "register to SDP Server failed.\n");
++ exit(0);
++ }
++ else
++ {
++ use_sdp = 1;
++ }
++ }
++#endif
+
+ reset:
+ handle = OBEX_Init(transport, obex_event, 0);
+@@ -963,12 +980,14 @@ reset:
+ exit(-1);
+ }
+ break;
++#ifdef HAVE_BLUETOOTH
+ case OBEX_TRANS_BLUETOOTH:
+ if (0 > BtOBEX_ServerRegister(handle, bt_src, channel)) {
+ perror("failed to register bluetooth server");
+ exit(-1);
+ }
+ break;
++#endif
+ case OBEX_TRANS_IRDA:
+ if (0 > IrOBEX_ServerRegister(handle, "")) {
+ perror("failed to register IrDA server");
+@@ -1002,11 +1021,13 @@ reset:
+ goto reset;
+ }
+
++#ifdef HAVE_BLUETOOTH
+ if (use_sdp)
+ {
+ fprintf(stderr, "sdp unregister\n");
+ obexftp_sdp_unregister();
+ }
++#endif
+
+ }
+
diff --git a/comms/obexftp/patches/patch-ak b/comms/obexftp/patches/patch-ak
index 45057c372bb..d58158c5b5f 100644
--- a/comms/obexftp/patches/patch-ak
+++ b/comms/obexftp/patches/patch-ak
@@ -1,8 +1,17 @@
-$NetBSD: patch-ak,v 1.1 2006/07/17 12:29:57 xtraeme Exp $
+$NetBSD: patch-ak,v 1.2 2006/07/24 17:07:15 xtraeme Exp $
---- apps/obexftp_sdp.c.orig 2006-07-15 19:50:12.000000000 +0100
+--- apps/obexftp_sdp.c.orig 2006-03-08 00:34:15.000000000 +0100
+++ apps/obexftp_sdp.c
-@@ -34,6 +34,53 @@
+@@ -25,6 +25,8 @@
+ #include <config.h>
+ #endif
+
++#ifdef HAVE_BLUETOOTH
++
+ #include <stdio.h>
+ #include <errno.h>
+ #include <unistd.h>
+@@ -34,6 +36,53 @@
#include <sys/types.h>
#include <sys/socket.h>
@@ -52,12 +61,13 @@ $NetBSD: patch-ak,v 1.1 2006/07/17 12:29:57 xtraeme Exp $
+
+ return 0;
+}
-+#else
++#else /* __NetBSD__ */
#include <bluetooth/bluetooth.h>
#include <bluetooth/sdp.h>
#include <bluetooth/sdp_lib.h>
-@@ -173,3 +220,4 @@ int obexftp_sdp_search(bdaddr_t *src, bd
+@@ -173,3 +222,5 @@ int obexftp_sdp_search(bdaddr_t *src, bd
return 0;
}
*/
-+#endif
++#endif /* !__NetBSD__ */
++#endif /* HAVE_BLUETOOTH */
diff --git a/comms/obexftp/patches/patch-al b/comms/obexftp/patches/patch-al
new file mode 100644
index 00000000000..de068be9be7
--- /dev/null
+++ b/comms/obexftp/patches/patch-al
@@ -0,0 +1,20 @@
+$NetBSD: patch-al,v 1.1 2006/07/24 17:07:15 xtraeme Exp $
+
+--- apps/obexftp.c.orig 2006-05-16 16:41:49.000000000 +0200
++++ apps/obexftp.c
+@@ -399,6 +399,7 @@ int main(int argc, char *argv[])
+ transport = OBEX_TRANS_CUSTOM;
+ fprintf(stderr, "Using TTY: %s\n", device);
+ }
++#ifdef HAVE_BLUETOOTH
+ if (getenv(OBEXFTP_BLUETOOTH) != NULL) {
+ device = getenv(OBEXFTP_BLUETOOTH);
+ if (channel <= 0 || strlen(device) < (6*2+5) || device[2]!=':')
+@@ -408,6 +409,7 @@ int main(int argc, char *argv[])
+ transport = OBEX_TRANS_BLUETOOTH;
+ fprintf(stderr, "Using BT: %s (%d)\n", device, channel);
+ }
++#endif
+ if (getenv(OBEXFTP_INET) != NULL) {
+ device = strdup(getenv(OBEXFTP_INET));
+ transport = OBEX_TRANS_INET;