Skip to content
GitLab
About GitLab
GitLab: the DevOps platform
Explore GitLab
Install GitLab
How GitLab compares
Get started
GitLab docs
GitLab Learn
Pricing
Talk to an expert
/
Help
What's new
2
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Projects
Groups
Snippets
Sign up now
Login
Sign in / Register
Toggle navigation
Menu
Open sidebar
Inkscape
inkscape
Commits
06b1437e
Verified
Commit
06b1437e
authored
Jul 05, 2021
by
Tobias C. Berner
Committed by
Marc Jeanmougin
Sep 08, 2021
Browse files
Add FreeBSD support
parent
ae585928
Pipeline
#367461076
canceled with stages
in 6 minutes and 43 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/path-prefix.cpp
View file @
06b1437e
...
...
@@ -25,6 +25,12 @@
#include
<sys/sysctl.h>
#endif
#ifdef __FreeBSD__
#include
<sys/param.h>
#include
<sys/types.h>
#include
<sys/sysctl.h>
#endif
#include
<cassert>
#include
<glib.h>
#include
<glibmm.h>
...
...
@@ -137,6 +143,15 @@ char const *get_program_name()
}
else
{
g_warning
(
"get_program_name() - sysctl failed"
);
}
#elif defined(__FreeBSD__)
int
mib
[
4
]
=
{
CTL_KERN
,
KERN_PROC
,
KERN_PROC_PATHNAME
,
-
1
};
char
buf
[
MAXPATHLEN
];
size_t
cb
=
sizeof
(
buf
);
if
(
sysctl
(
mib
,
4
,
buf
,
&
cb
,
NULL
,
0
)
==
0
)
{
program_name
=
realpath
(
buf
,
nullptr
);
}
else
{
g_warning
(
"get_program_name() - sysctl failed"
);
}
#else
#warning get_program_name() - no known way to obtain executable name on this platform
g_info
(
"get_program_name() - no known way to obtain executable name on this platform"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment