]> xenbits.xensource.com Git - libvirt.git/commit
virprocess: fix MinGW build and RHEL-5 build
authorPavel Hrdina <phrdina@redhat.com>
Thu, 12 Feb 2015 12:46:08 +0000 (13:46 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Thu, 12 Feb 2015 17:00:21 +0000 (18:00 +0100)
commit94cc577807ba721871a4f770e2d9981178e7b070
tree397c0c689fe623008e06fbe609f24b2b8cb2c02f
parentd618cdc965da3bf95ed4352111ef3c676b2de782
virprocess: fix MinGW build and RHEL-5 build

Commit b6a2828e introduced new functions to set process scheduler. There
is a small typo in ELSE path for systems where scheduler is not
available.

Also some of the definitions were introduced later in kernel. For
example RHEL-5 is running on kernel 2.6.18, but SCHED_IDLE was introduces
in 2.6.23 [1] and SCHED_BATCH in 2.6.16 [1]. We should not count only on
existence of function sched_setscheduler(), we must also check for
existence of used macros as they might not be defined.

[1] see 'man 7 sched'

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
src/util/virprocess.c