aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaddy <naddy@FreeBSD.org>2008-07-19 04:15:06 +0800
committernaddy <naddy@FreeBSD.org>2008-07-19 04:15:06 +0800
commit9f847245f01134f35ed0313ce2ee35246f416f04 (patch)
treeecefb5dd0273c0e06d21d828ea13df308997f12f
parent36288b2dbf7b0c42c572f9db9b0da22e437f261e (diff)
downloadfreebsd-ports-gnome-9f847245f01134f35ed0313ce2ee35246f416f04.tar.gz
freebsd-ports-gnome-9f847245f01134f35ed0313ce2ee35246f416f04.tar.zst
freebsd-ports-gnome-9f847245f01134f35ed0313ce2ee35246f416f04.zip
LP64 fixes: normalize truth values rather than truncating to int.
Approved by: maintainer Obtained from: Arnaud Bergeron <abergeron@gmail.com>
-rw-r--r--audio/mt-daapd/Makefile1
-rw-r--r--audio/mt-daapd/files/patch-src_daap.c83
-rw-r--r--audio/mt-daapd/files/patch-src_playlist.c11
-rw-r--r--audio/mt-daapd/files/patch-src_query.c11
4 files changed, 106 insertions, 0 deletions
diff --git a/audio/mt-daapd/Makefile b/audio/mt-daapd/Makefile
index 0e1832aa2a79..fb6b7a3d665f 100644
--- a/audio/mt-daapd/Makefile
+++ b/audio/mt-daapd/Makefile
@@ -7,6 +7,7 @@
PORTNAME= mt-daapd
PORTVERSION= 0.2.4.2
+PORTREVISION= 1
CATEGORIES= audio japanese
MASTER_SITES= SF
diff --git a/audio/mt-daapd/files/patch-src_daap.c b/audio/mt-daapd/files/patch-src_daap.c
new file mode 100644
index 000000000000..58fe2fd83992
--- /dev/null
+++ b/audio/mt-daapd/files/patch-src_daap.c
@@ -0,0 +1,83 @@
+--- src/daap.c.orig 2008-04-19 21:17:23.000000000 +0200
++++ src/daap.c 2008-07-18 16:32:13.000000000 +0200
+@@ -175,7 +175,7 @@ int daap_add_mdcl(DAAP_BLOCK *root, char
+
+ mdcl=daap_add_empty(root,"mdcl");
+ if(mdcl) {
+- g=(int)daap_add_string(mdcl,"mcnm",tag);
++ g = !!daap_add_string(mdcl,"mcnm",tag);
+ g = g && daap_add_string(mdcl,"mcna",name);
+ g = g && daap_add_short(mdcl,"mcty",number);
+ }
+@@ -202,7 +202,7 @@ DAAP_BLOCK *daap_response_content_codes(
+
+ root=daap_add_empty(NULL,"mccr");
+ if(root) {
+- g = (int)daap_add_int(root,"mstt",200);
++ g = !!daap_add_int(root,"mstt",200);
+
+ while(current->type) {
+ g = g && daap_add_mdcl(root,current->tag,current->description,
+@@ -235,7 +235,7 @@ DAAP_BLOCK *daap_response_login(char *ho
+
+ root=daap_add_empty(NULL,"mlog");
+ if(root) {
+- g = (int)daap_add_int(root,"mstt",200);
++ g = !!daap_add_int(root,"mstt",200);
+ session=config_get_next_session();
+ g = g && daap_add_int(root,"mlid",session);
+ }
+@@ -437,7 +437,7 @@ DAAP_BLOCK *daap_response_songlist(char*
+
+ root=daap_add_empty(NULL,"adbs");
+ if(root) {
+- g = (int)daap_add_int(root,"mstt",200);
++ g = !!daap_add_int(root,"mstt",200);
+ g = g && daap_add_char(root,"muty",0);
+ g = g && daap_add_int(root,"mtco",0);
+ g = g && daap_add_int(root,"mrco",0);
+@@ -630,7 +630,7 @@ DAAP_BLOCK *daap_response_update(int fd,
+
+ root=daap_add_empty(NULL,"mupd");
+ if(root) {
+- g = (int)daap_add_int(root,"mstt",200);
++ g = !!daap_add_int(root,"mstt",200);
+ /* theoretically, this would go up if the db changes? */
+ g = g && daap_add_int(root,"musr",db_version());
+ }
+@@ -661,7 +661,7 @@ DAAP_BLOCK *daap_response_playlists(char
+
+ root=daap_add_empty(NULL,"aply");
+ if(root) {
+- g = (int)daap_add_int(root,"mstt",200);
++ g = !!daap_add_int(root,"mstt",200);
+ g = g && daap_add_char(root,"muty",0);
+ g = g && daap_add_int(root,"mtco",1 + db_get_playlist_count());
+ g = g && daap_add_int(root,"mrco",1 + db_get_playlist_count());
+@@ -731,7 +731,7 @@ DAAP_BLOCK *daap_response_dbinfo(char *n
+
+ root=daap_add_empty(NULL,"avdb");
+ if(root) {
+- g = (int)daap_add_int(root,"mstt",200);
++ g = !!daap_add_int(root,"mstt",200);
+ g = g && daap_add_char(root,"muty",0);
+ g = g && daap_add_int(root,"mtco",1);
+ g = g && daap_add_int(root,"mrco",1);
+@@ -788,7 +788,7 @@ DAAP_BLOCK *daap_response_server_info(ch
+ apro = 2 << 16;
+ }
+
+- g = (int)daap_add_int(root,"mstt",200); /* result */
++ g = !!daap_add_int(root,"mstt",200); /* result */
+ g = g && daap_add_int(root,"mpro",mpro); /* dmap proto ? */
+ g = g && daap_add_int(root,"apro",apro); /* daap protocol */
+
+@@ -889,7 +889,7 @@ DAAP_BLOCK *daap_response_playlist_items
+
+ root=daap_add_empty(NULL,"apso");
+ if(root) {
+- g = (int)daap_add_int(root,"mstt",200);
++ g = !!daap_add_int(root,"mstt",200);
+ g = g && daap_add_char(root,"muty",0);
+ g = g && daap_add_int(root,"mtco",0);
+ g = g && daap_add_int(root,"mrco",0);
diff --git a/audio/mt-daapd/files/patch-src_playlist.c b/audio/mt-daapd/files/patch-src_playlist.c
new file mode 100644
index 000000000000..7f1beed1e9fb
--- /dev/null
+++ b/audio/mt-daapd/files/patch-src_playlist.c
@@ -0,0 +1,11 @@
+--- src/playlist.c.orig 2008-04-19 21:31:30.000000000 +0200
++++ src/playlist.c 2008-07-18 16:32:13.000000000 +0200
+@@ -352,7 +352,7 @@ int pl_eval_node(MP3FILE *pmp3, PL_NODE
+ retval = not ? r_arg : !r_arg;
+ break;
+ case INCLUDES:
+- r_arg=(int)strcasestr(cval,pnode->arg2.cval);
++ r_arg=!!strcasestr(cval,pnode->arg2.cval);
+ retval = not ? !r_arg : r_arg;
+ break;
+ }
diff --git a/audio/mt-daapd/files/patch-src_query.c b/audio/mt-daapd/files/patch-src_query.c
new file mode 100644
index 000000000000..7575a09a076a
--- /dev/null
+++ b/audio/mt-daapd/files/patch-src_query.c
@@ -0,0 +1,11 @@
+--- src/query.c.orig 2008-04-19 21:17:23.000000000 +0200
++++ src/query.c 2008-07-18 16:32:13.000000000 +0200
+@@ -577,7 +577,7 @@ static int string_query(query_node_t* qu
+ }
+
+ case qot_contains:
+- return (int) strcasestr(ts, query->right.str); /* returns null if not found */
++ return !!strcasestr(ts, query->right.str); /* returns null if not found */
+
+ default:
+ DPRINTF(E_LOG,L_QRY,"Illegal query type: %d\n", query->type);