Zitat von Iain Hibbert <plu...@rya-online.net>: > Hi > > Since I saw rumours of a 2.0 release, I tried to build openobex cloned > from > > git://git.kernel.org/pub/scm/bluetooth/openobex.git > > on NetBSD.. some patches to follow but I still have trouble with the
A tester/developer for *BSD is always welcome :-) > <openobex/obex.h> file, the following: > > #if !defined(bt_addr_t) > # if defined(SOL_RFCOMM) > # if defined(_WIN32) /* Windows */ > # define bt_addr_t BTH_ADDR > # else /* Linux, FreeBSD, NetBSD */ > # define bt_addr_t bdaddr_t > # endif > # else /* no bluetooth stack available */ > # define bt_addr_t unsigned long > # endif > #endif > > does not actually work since SOL_RFCOMM is never defined on BSD at least > (we just use the BTPROTO_RFCOMM value instead), and on BlueZ/Linux it is > only defined where <bluetooth/bluetooth.h> is included prior (otherwise > the problem is masked, by using unsigned long) That is exactly the intended behaviour. If you want to use the bluetooth functions, you must include the proper bluetooth headers, see lib/bluez_compat.h. > if I rework it to use > something that is defined in <sys/socket.h>, as follows: > > /* > * Bluetooth OBEX API, only when Bluetooth is available > */ > #if !defined(bt_addr_t) > # if defined(_WIN32) /* Windows */ > # if defined(PF_BTH) > # define bt_addr_t BTH_ADDR > # endif > # elif defined(PF_BLUETOOTH) /* Linux, BSD, etc.. */ > # define bt_addr_t bdaddr_t > # endif > #endif > > #if defined(bt_addr_t) > OPENOBEX_SYMBOL(int) BtOBEX_ServerRegister(obex_t *self, const > bt_addr_t *src, uint8_t channel); > OPENOBEX_SYMBOL(int) BtOBEX_TransportConnect(obex_t *self, const > bt_addr_t *src, const bt_addr_t *dst, uint8_t channel); > #endif I like the change :-) Using PF_BLUETOOTH seems like a good idea, especially if those function will be used also with L2CAP. Can you make a patch? HS ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ Openobex-users mailing list Openobex-users@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/openobex-users