summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2008-12-15 15:06:43 +0000
committerrillig <rillig@pkgsrc.org>2008-12-15 15:06:43 +0000
commit069677a7b293cfe00a530f2bb8c811386e9d8d7f (patch)
tree26e2f341309f4f2b07ea4bf13ce8ae21f903938b /security
parentefb528fb82e4b00bbe053419b0a73ca49e28b14f (diff)
downloadpkgsrc-069677a7b293cfe00a530f2bb8c811386e9d8d7f.tar.gz
gcc complains when an int is cast to a pointer of different size. To
avoid that warning, the ints are first cast to size_t, which is more likely to match the size of a pointer. Unfortunately, the intptr_t and uintptr_t types are marked optional in C99.
Diffstat (limited to 'security')
-rw-r--r--security/policykit/distinfo3
-rw-r--r--security/policykit/patches/patch-authdb25
2 files changed, 27 insertions, 1 deletions
diff --git a/security/policykit/distinfo b/security/policykit/distinfo
index 31ad6eac416..03992e6b688 100644
--- a/security/policykit/distinfo
+++ b/security/policykit/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2008/11/23 22:28:23 jmcneill Exp $
+$NetBSD: distinfo,v 1.4 2008/12/15 15:06:43 rillig Exp $
SHA1 (PolicyKit-0.9.tar.gz) = ac99c580eff72f6d5df261c155fb047306439f85
RMD160 (PolicyKit-0.9.tar.gz) = 197262d1c48e55558dd4bd57d7bbd8734666129c
@@ -13,3 +13,4 @@ SHA1 (patch-ag) = bfa1a32a26d80a3cbc90144ae137d4ad06832e61
SHA1 (patch-ah) = a1ae419a77bb3c8be02706bb67476af9443af92a
SHA1 (patch-ai) = 9ec3744b394b0f6181a8a3367f0ce93e32b7fc4f
SHA1 (patch-aj) = 596b9eb54173e25176ba0f363e4b2c4c137dd89f
+SHA1 (patch-authdb) = 449b8ac50f81cc0234e17e64bc9892ade7119028
diff --git a/security/policykit/patches/patch-authdb b/security/policykit/patches/patch-authdb
new file mode 100644
index 00000000000..ed466d35c3e
--- /dev/null
+++ b/security/policykit/patches/patch-authdb
@@ -0,0 +1,25 @@
+$NetBSD: patch-authdb,v 1.1 2008/12/15 15:06:43 rillig Exp $
+
+A uid isn't necessarily as large as a pointer, therefore gcc warns about
+that cast.
+
+--- src/polkit/polkit-authorization-db.c.orig 2008-05-30 23:24:44.000000000 +0200
++++ src/polkit/polkit-authorization-db.c 2008-12-15 13:58:52.000000000 +0100
+@@ -289,7 +289,7 @@ _authdb_get_auths_for_uid (PolKitAuthori
+
+ /* first, see if this is in the cache */
+ if (authdb->uid_to_authlist != NULL) {
+- ret = kit_hash_lookup (authdb->uid_to_authlist, (void *) uid, NULL);
++ ret = kit_hash_lookup (authdb->uid_to_authlist, (void *) (ssize_t) uid, NULL);
+ if (ret != NULL)
+ goto out;
+ }
+@@ -424,7 +424,7 @@ _authdb_get_auths_for_uid (PolKitAuthori
+ }
+
+ if (authdb->uid_to_authlist == NULL ||
+- !kit_hash_insert (authdb->uid_to_authlist, (void *) uid, ret)) {
++ !kit_hash_insert (authdb->uid_to_authlist, (void *) (ssize_t) uid, ret)) {
+ polkit_error_set_error (error,
+ POLKIT_ERROR_OUT_OF_MEMORY,
+ "No memory");