Skip to content

Commit e2a5161

Browse files
committed
daemonize: fix build failure on Linux
1 parent b6e0ca6 commit e2a5161

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/daemonize.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,11 @@ static int _prefs_setgroups(char const * username)
191191
gid_t * groups = NULL;
192192
gid_t * p;
193193

194+
#ifdef __linux__
195+
setgrent();
196+
#else
194197
setgroupent(1);
198+
#endif
195199
while((gr = getgrent()) != NULL)
196200
for(i = 0; gr->gr_mem[i] != NULL; i++)
197201
{

0 commit comments

Comments
 (0)