! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
extern char** environ is not defined on BSD platforms
Status:
RESOLVED: FIXED
Product:
Xfce4-panel
Component:
Launcher

Comments

Description Landry Breuil editbugs 2009-01-19 20:49:13 CET
Created attachment 2099 
Fix build on *BSDs

As reported on xfce4-dev mailing list, extern char** environ is not defined on FreeBSD/OpenBSD/MacOS, and breaks build.

Adding 'extern char** environ;' on top of launcher-exec.c fixes it.
Comment 1 Anders F Björklund 2009-01-19 21:00:00 CET
Mac OS X doesn't have an "environ" symbol,
so simply declaring it doesn't fix it there.
Comment 2 Anders F Björklund 2009-01-19 21:01:29 CET
Created attachment 2100 
patch-launcher-exec.c
Comment 3 Nick Schermer editbugs 2009-01-25 12:29:44 CET
Created attachment 2115 
Another patch

I want to avoid a compiler warning on linux systems, there fore i removed the variable in the first place. Maybe this one works.
Comment 4 Nick Schermer editbugs 2009-01-25 12:45:03 CET
Last patch seems to work on bsd. Closing bug.

Bug #4834

Reported by:
Landry Breuil
Reported on: 2009-01-19
Last modified on: 2009-01-25

People

Assignee:
Nick Schermer
CC List:
1 user

Version

Attachments

Fix build on *BSDs (271 bytes, patch)
2009-01-19 20:49 CET , Landry Breuil
no flags
patch-launcher-exec.c (381 bytes, patch)
2009-01-19 21:01 CET , Anders F Björklund
no flags
Another patch (619 bytes, application/octet-stream)
2009-01-25 12:29 CET , Nick Schermer
no flags

Additional information