Configure and build fix for VirtFS
cover Configure and build fix for VirtFS
Minor fixes:
============
1) glib2 deprecated g_atomic_int_exchange_and_add in favour of g_atomic_int_add since ver 2.30 and therefore build breaks with newer glib2 library.
2) Configure needs to report appropriate error on missing libraries for VirtFS.
Harsh Prateek Bora (2):
trace/simple.c: fix deprecated glib2 interface
configure: report appropriate error on missing library
configure | 3 ++- trace/simple.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.10.2
PATCH 2/2 configure: report appropriate error on missing library
--- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
configure +2 -1
@@ -2915,7 +2915,8 @@ if test "$softmmu" = yes ; then tools="$tools fsdev/virtfs-proxy-helper\$(EXESUF)" else if test "$virtfs" = yes; then - feature_not_found "virtfs" + echo "VirtFS is supported only on Linux and requires libcap-devel and libattr-devel" + exit 1 fi virtfs=no fi
Signature · 1 line
1.7.10.2
PATCH 1/2 trace/simple.c: fix deprecated glib2 interface
In reply to Harsh Prateek Bora--- trace/simple.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
trace/simple.c +4 -1
@@ -161,8 +161,11 @@ static void trace(TraceEventID event, uint64_t x1, uint64_t x2, uint64_t x3, } timestamp =get_clock (); - +#if GLIB_CHECK_VERSION (2 ,30 ,0 ) + idx =g_atomic_int_add ((gint *)&trace_idx,1 ) %TRACE_BUF_LEN ; +#else idx =g_atomic_int_exchange_and_add ((gint *)&trace_idx,1 ) %TRACE_BUF_LEN ; +#endif trace_buf[idx] = (TraceRecord ){ .event = event, .timestamp_ns = timestamp,
Signature · 1 line
1.7.10.2
Stefan Hajnoczi
AppliedQuoted 7 lines · Harsh Prateek Bora
Minor fixes:
============1) glib2 deprecated
g_atomic_int_exchange_and_addin favour ofg_atomic_int_addsince ver 2.30 and therefore build breaks with newer glib2 library.
2) Configure needs to report appropriate error on missing libraries for VirtFS.
Quoted 11 lines
Harsh Prateek Bora (2):
trace/simple.c: fix deprecated glib2 interface
configure: report appropriate error on missing libraryconfigure | 3 ++- trace/simple.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-)Signature · 1 line
1.7.10.2
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
Stefan