Comments (10)
I am working on this.
from systemd.
The right fix for this issue is probably not just to fix the example, but to test-build all examples we ship as part of CI
from systemd.
It compiles and runs just fine here on bookworm, which version of gcc did you try it with?
$ gcc man/notify-selfcontained-example.c -o /tmp/notify
$
from systemd.
gcc -std=c99 ./man/notify-selfcontained-example.c
from systemd.
The right fix for this issue is probably not just to fix the example, but to test-build all examples we ship as part of CI
Agreed. As far as I know currently the headers are compiled but I'm not sure what's going on with the examples. To judge from #32030 (comment) at least some examples should be compiled as far as I understand but that's something @mrc0mmand probably knows better.
from systemd.
BTW, should the test code built with -std=gnu11, which is our default? Or, -std=c99 or something non-gnu standard?
from systemd.
As far as I can see at least the headers are compiled with all sorts of standards
src/systemd/meson.build: foreach opt : ['-std=c++14',
src/systemd/meson.build: '-std=c++17',
src/systemd/meson.build: '-std=c++20',
src/systemd/meson.build: '-std=c++23',
src/systemd/meson.build: '-std=c++26',
because they can be embedded in all sorts of things. The example is supposed to be copy-pastable too so it should probably be compiled with -std=c*
. (I just copy-pasted the example to a build system where it failed to compile spectacularly)
from systemd.
WIP branch -> #32057.
from systemd.
Turns out man/notify-selfcontained-example.c did compile on all tested combinations without changes, hence retitling accordingly
from systemd.
It doesn't. Without -D_GNU_SOURCE
it isn't exactly self-contained. That being sad I poked it and it's useless because sd_notify
usually comes with sd_listen
and it's necessary to look at libsystemd anyway.
from systemd.
Related Issues (20)
- vmspawn: Support running [email protected] as a unprivileged user
- Add generic Network directives for network configuration HOT 9
- vmspawn: Make nested virtualization toggleable HOT 3
- Get loaded policy while DBUS-daemon is running HOT 1
- mount.ddi (systemd-dissect) segfaults when called with bogus arguments
- systemd-udevd does not pick up some link dropin files HOT 9
- weird square chars in systemd console messages HOT 11
- systemd-oomd: kill more process than expected (and reported)
- systemd-cryptsetup fails to unlock TPM2 bound LUKS volume HOT 11
- systemd.path not launch script HOT 1
- Search engines link to pages with trailing slashes and end up in a 404 HOT 5
- systemctl stop <service> on failed service hangs forever HOT 2
- Failed to set EFI variable HibernateLocation: Invalid argument - when hibernating HOT 5
- docs: make clear that BindPaths= implies PrivateMounts= which detaches the mount namespace of a service from the host HOT 8
- Early boot services requiring /var are not ordered after local-fs.target HOT 9
- systemd-journal-upload hangs forever and ignores SIGTERM when connecting to unknown port and doesn't get ICMP reply HOT 2
- long messages support (--all option) for systemd-journal-gatewayd json output
- Support for AT_SYMLINK_NOFOLLOW in Systemd Bind Mounts HOT 8
- Replace "machined" label with "machine"
- systemd unexpectedly(?) terminates units with `Unexpected error response from GetNameOwner(): Connection terminated` during a "mount storm" HOT 19
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from systemd.