diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2009-07-07 05:18:03 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2009-07-07 05:18:03 +0800 |
commit | 15da4534fd71827b7d22503babaee9a812aa3fbd (patch) | |
tree | 812429234634e2cdfadb09465b852a53b9d4edf8 /x11/gdm/files/patch-gui_simple-greeter_gdm-user-manager.c | |
parent | 59672dbe4342e56794beea8468926a892357c2ff (diff) | |
download | marcuscom-ports-15da4534fd71827b7d22503babaee9a812aa3fbd.tar.gz marcuscom-ports-15da4534fd71827b7d22503babaee9a812aa3fbd.tar.zst marcuscom-ports-15da4534fd71827b7d22503babaee9a812aa3fbd.zip |
Add a hack to fix the build with libxklavier 4.0.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@12425 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'x11/gdm/files/patch-gui_simple-greeter_gdm-user-manager.c')
-rw-r--r-- | x11/gdm/files/patch-gui_simple-greeter_gdm-user-manager.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/x11/gdm/files/patch-gui_simple-greeter_gdm-user-manager.c b/x11/gdm/files/patch-gui_simple-greeter_gdm-user-manager.c new file mode 100644 index 000000000..d666bc1fd --- /dev/null +++ b/x11/gdm/files/patch-gui_simple-greeter_gdm-user-manager.c @@ -0,0 +1,51 @@ +--- gui/simple-greeter/gdm-user-manager.c.orig 2008-04-29 13:38:43.000000000 -0400 ++++ gui/simple-greeter/gdm-user-manager.c 2008-05-03 13:27:52.000000000 -0400 +@@ -1269,17 +1269,23 @@ reload_passwd (GdmUserManager *manager) + GSList *old_users; + GSList *new_users; + GSList *list; +- FILE *fp; ++#ifndef __FreeBSD__ ++ FILE *fp; ++#endif + + old_users = NULL; + new_users = NULL; + ++#ifdef __FreeBSD__ ++ setpwent (); ++#else + errno = 0; + fp = fopen (PATH_PASSWD, "r"); + if (fp == NULL) { + g_warning ("Unable to open %s: %s", PATH_PASSWD, g_strerror (errno)); + goto out; + } ++#endif + + g_hash_table_foreach (manager->priv->users, listify_hash_values_hfunc, &old_users); + g_slist_foreach (old_users, (GFunc) g_object_ref, NULL); +@@ -1292,7 +1298,11 @@ reload_passwd (GdmUserManager *manager) + } + } + ++#ifdef __FreeBSD__ ++ for (pwent = getpwent (); pwent != NULL; pwent = getpwent ()) { ++#else + for (pwent = fgetpwent (fp); pwent != NULL; pwent = fgetpwent (fp)) { ++#endif + GdmUser *user; + + user = NULL; +@@ -1355,7 +1365,11 @@ reload_passwd (GdmUserManager *manager) + out: + /* Cleanup */ + ++#ifdef __FreeBSD__ ++ endpwent (); ++#else + fclose (fp); ++#endif + + g_slist_foreach (new_users, (GFunc) g_object_thaw_notify, NULL); + g_slist_foreach (new_users, (GFunc) g_object_unref, NULL); |