The libudev.h should include preprocessor details to avoid mangling when compiled into a C++ application.
I guess that's fixed since udev 151 year, and should not be in the rawhide version: http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h=3fac12b9a05f1849f7b1373060ade18269839856