Better handle API version in mako.c
Only use fdb_future_get_int64 for API version >= 620.
This commit is contained in:
parent
7c0aca5b0c
commit
7fd772803e
|
@ -294,9 +294,18 @@ int64_t run_op_getreadversion(FDBTransaction *transaction) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
#if FDB_API_VERSION < 620
|
||||
err = fdb_future_get_version(f, &rv);
|
||||
#else
|
||||
err = fdb_future_get_int64(f, &rv);
|
||||
#endif
|
||||
|
||||
if (err) {
|
||||
#if FDB_API_VERSION < 620
|
||||
fprintf(stderr, "ERROR: fdb_future_get_version: %s\n", fdb_get_error(err));
|
||||
#else
|
||||
fprintf(stderr, "ERROR: fdb_future_get_int64: %s\n", fdb_get_error(err));
|
||||
#endif
|
||||
}
|
||||
fdb_future_destroy(f);
|
||||
return rv;
|
||||
|
|
Loading…
Reference in New Issue