
On 03/23/2011 07:30 AM, Daniel P. Berrange wrote:
What is the oldest version of libvirt that you need to be able to run libvirt-snmp against ?
This impl of the file handle / timer callbacks taken from the C example program is really not a very good one to copy / use.
If you are able to say that you only need to support the next libvirt 0.9.0 or newer, then you can simply use our new public APIs for this
int virEventRegisterDefaultImpl(void); int virEventRunDefaultImpl(void);
If you want for upstream libvirt-snmp to compile out of the box against RHEL 5.6 (which shipped with libvirt 0.8.2), then I'd opt for the option of copying the latest libvirt.git event_poll.c implementation (earlier versions had bugs), but avoiding the new 0.9.0 APIs.
On the other hand, if you need to be able to build against older libvirt releases, then you should probably just copy the code from src/util/event_poll.c in the libvirt GIT repo, straight into libvirt-snmp, instead of using the C event example code.
-- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org