[systemd-devel] [systemd-commits] man/sd_journal_query_unique.xml

Lennart Poettering lennart at poettering.net
Thu Oct 18 13:41:56 PDT 2012


On Thu, 18.10.12 21:19, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl) wrote:

> Hi,
> some small problems:
> 
> /bin/ld: warning: using 'LIBSYSTEMD_JOURNAL_38' as version for 'sd_journal_query_unique' which is also named in version 'LIBSYSTEMD_JOURNAL_195' in script
> /bin/ld: warning: using 'LIBSYSTEMD_JOURNAL_38' as version for 'sd_journal_enumerate_unique' which is also named in version 'LIBSYSTEMD_JOURNAL_195' in script
> /bin/ld: warning: using 'LIBSYSTEMD_JOURNAL_38' as version for 'sd_journal_restart_unique' which is also named in version 'LIBSYSTEMD_JOURNAL_195' in script
> 
> Those symbols were added long time ago, and then commented out in the
> .c and .h files in 19a2bd80, but not in the .sym file. I'm not sure
> what the correct solution is here (remove them from
> LIBSYSTEMD_JOURNAL_38 ?).

Ouch, I wonder why I didn't get these warnings.

I now removed the old definitions which were pretty pointless given that
the functions didn't actually exist.

> Compiling the example from the man pages:
> list.c:21:20: warning: passing argument 2 of ‘sd_journal_enumerate_unique’ from incompatible pointer type [enabled by default]
> In file included from list.c:3:0:
> /usr/include/systemd/sd-journal.h:123:5: note: expected ‘const void **’ but argument is of type ‘const char **’
> 
> Using const char** in the API seems nicer.

Well, the journal is binary safe. You can even stick NUL bytes into
it. Hence we use "void*" rather than "char*" wherever things could be
binary...

> I'm also pushing an addition of _public_ to sd_journal_restart_unique. The
> example doesn't want to compile otherwise.

Ouch. Thanks!

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list