Use xenstore.h when xen >= 4.2

release2
Davíð Steinn Geirsson 10 years ago committed by Marek Marczykowski-Górecki
parent b4751c55dc
commit bc75b6559b

@ -1,6 +1,12 @@
CC=gcc
CFLAGS=-Wall -Wextra -Werror -g -O3
all: meminfo-writer
_XENSTORE_H=$(shell ls /usr/include/xenstore.h)
ifneq "$(_XENSTORE_H)" ""
CFLAGS+= -DUSE_XENSTORE_H
endif
meminfo-writer: meminfo-writer.o
$(CC) -g -o meminfo-writer meminfo-writer.o -lxenstore
install:

@ -2,7 +2,11 @@
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef USE_XENSTORE_H /* Xen >= 4.2 */
#include <xenstore.h>
#else
#include <xs.h>
#endif
#include <syslog.h>
#include <string.h>
#include <signal.h>

@ -5,6 +5,12 @@ COMMONIOALL=ioall.o
SO_VER=1
LDFLAGS=-shared
_XENSTORE_H=$(shell ls /usr/include/xenstore.h)
ifneq "$(_XENSTORE_H)" ""
CFLAGS+= -DUSE_XENSTORE_H
endif
all: libqrexec-utils.so.$(SO_VER) libqubes-rpc-filecopy.so.$(SO_VER)
libqrexec-utils.so.$(SO_VER): unix-server.o ioall.o buffer.o write-stdin.o exec.o txrx-vchan.o
$(CC) $(LDFLAGS) -Wl,-soname,$@ -o $@ $^ $(XENLIBS)

@ -24,7 +24,11 @@
#include <stdlib.h>
#include <signal.h>
#include <libvchan.h>
#ifdef USE_XENSTORE_H
#include <xenstore.h>
#else
#include <xs.h>
#endif
#include <xenctrl.h>
static struct libvchan *ctrl;

Loading…
Cancel
Save