diff src/perl.c @ 3395:c731327dbc47

[gaim-migrate @ 3414] Thanks to Timothy Lee and Dan Colascione for gettiing perl 5.8 to work. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Fri, 16 Aug 2002 01:18:01 +0000
parents c98c1e0281ff
children 8fa61405af2b
line wrap: on
line diff
--- a/src/perl.c	Thu Aug 15 04:04:23 2002 +0000
+++ b/src/perl.c	Fri Aug 16 01:18:01 2002 +0000
@@ -34,6 +34,8 @@
 
 #ifdef USE_PERL
 
+#define group perl_group
+
 #include <EXTERN.h>
 #ifndef _SEM_SEMUN_UNDEFINED
 #define HAS_UNION_SEMUN
@@ -49,6 +51,7 @@
 #include <dirent.h>
 #include <string.h>
 
+#undef group
 
 /* perl module support */
 extern void xs_init _((void));
@@ -175,13 +178,14 @@
 {
 	DIR *dir;
 	struct dirent *ent;
+	struct dirent dirent_buf;
 	char *buf;
 	char *path;
 
 	path = gaim_user_dir();
 	dir = opendir(path);
 	if (dir) {
-		while ((ent = readdir(dir))) {
+		while ((readdir_r(dir,&dirent_buf,&ent),ent)) {
 			if (strcmp(ent->d_name, ".") && strcmp(ent->d_name, "..")) {
 				if (is_pl_file(ent->d_name)) {
 					buf = g_malloc(strlen(path) + strlen(ent->d_name) + 2);