This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Don't look for kernel version if not running on linux


You can get uname() on Windows through gnulib, but at the cost at
linking to additional windows DLLs. It calls gethostname and for that
we need to link against ws2_32.dll. That's an unreasonable dependency
for getting something we cannot use anyway. I suggest we just set
errno to ENOTSUP then.

I should clarify this a bit. We only use uname() to obtain the kernel version and we only use the kernel version to search for directories containing kernel modules. The only operating system where this makes sense is linux as we cannot handle anything but linux kernel modules there. Therefore there is no point in retrieving the kernel version on any other OS.

We might still be able to load linux kernel modules from some directory on a different OS, but the automatic detection of that directory can be skipped.

Ulf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]