GNOME Bugzilla – Bug 743072
Support *BSD uuid functions
Last modified: 2015-04-06 11:53:22 UTC
Created attachment 294730 [details] [review] Compilation fix on *BSD without libuuid. Most BSDs have uuid functions in their standard C library with a different API than Linux' libuuid; see e.g. here for the NetBSD versions of these functions: http://netbsd.gw.com/cgi-bin/man-cgi?uuid_compare++NetBSD-current The attached patch adds support for these functions to libgupnp. Additionally, the configure script needs to be taught to be happy if it finds e.g. uuid_create(), and not insist on linking against libuuid in that case.
Review of attachment 294730 [details] [review]: Minor issues; I can fix them after committing if you don't want to do it ::: libgupnp/gupnp-service.c.orig @@ +1110,1 @@ you could enclose the whole section in { } and use #ifdef on that to have only one ifdef @@ +1113,3 @@ + uuid_to_string(&id, &myout, 0); + strncpy(out, myout, sizeof(out)); + free(myout); style issue: ws before (
Created attachment 294872 [details] [review] Adapted patch, as requested. I've adapted the patch per your comments. Is it ok now?
looking at the declaration of uuid_create(uuid_t *uuid, uint32_t *status), why are you passing 0 as second argument? Shouldn't that be eihter a valid status or NULL for clarity?
Created attachment 295358 [details] [review] Add more error handling Thanks, that's a good point. I've added more error handling to the patch.
Created attachment 301005 [details] [review] Use GUUL for native UUID support Signed-off-by: Jens Georg <mail@jensge.org>
Created attachment 301006 [details] [review] Use GUUL for native UUID support Signed-off-by: Jens Georg <mail@jensge.org>
Pushed as part of the UUID rework