summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common/xmlconfig.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/common/xmlconfig.c')
-rw-r--r--src/mesa/drivers/dri/common/xmlconfig.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/xmlconfig.c b/src/mesa/drivers/dri/common/xmlconfig.c
index 8602d47cf97..f6ae75520c5 100644
--- a/src/mesa/drivers/dri/common/xmlconfig.c
+++ b/src/mesa/drivers/dri/common/xmlconfig.c
@@ -63,6 +63,12 @@ extern char *program_invocation_name, *program_invocation_short_name;
#elif defined(__NetBSD__) && defined(__NetBSD_Version) && (__NetBSD_Version >= 106000100)
# include <stdlib.h>
# define GET_PROGRAM_NAME() getprogname()
+#elif defined(__sun)
+/* Solaris has getexecname() which returns the full path - return just
+ the basename to match BSD getprogname() */
+# include <stdlib.h>
+# include <libgen.h>
+# define GET_PROGRAM_NAME() basename(getexecname())
#endif
#if !defined(GET_PROGRAM_NAME)