forked from vitalif/vitastor
Fix compile errors for newer gcc
parent
b6f0c1cde5
commit
d35ce8ab3d
10
Makefile
10
Makefile
|
@ -17,14 +17,14 @@ osd_read.o: osd_read.cpp osd.h osd_ops.h
|
||||||
osd_send.o: osd_send.cpp osd.h osd_ops.h
|
osd_send.o: osd_send.cpp osd.h osd_ops.h
|
||||||
g++ $(CXXFLAGS) -c -o $@ $<
|
g++ $(CXXFLAGS) -c -o $@ $<
|
||||||
osd: $(BLOCKSTORE_OBJS) osd_main.cpp osd.h osd_ops.h osd.o osd_exec_secondary.o osd_read.o osd_send.o json11.o
|
osd: $(BLOCKSTORE_OBJS) osd_main.cpp osd.h osd_ops.h osd.o osd_exec_secondary.o osd_read.o osd_send.o json11.o
|
||||||
g++ $(CXXFLAGS) -ltcmalloc_minimal -luring -o osd osd_main.cpp osd.o osd_exec_secondary.o osd_read.o osd_send.o json11.o $(BLOCKSTORE_OBJS)
|
g++ $(CXXFLAGS) -ltcmalloc_minimal -o osd osd_main.cpp osd.o osd_exec_secondary.o osd_read.o osd_send.o json11.o $(BLOCKSTORE_OBJS) -luring
|
||||||
test: test.cpp
|
test: test.cpp
|
||||||
g++ $(CXXFLAGS) -o test -luring test.cpp
|
g++ $(CXXFLAGS) -o test test.cpp -luring
|
||||||
test_blockstore: $(BLOCKSTORE_OBJS) test_blockstore.cpp
|
test_blockstore: $(BLOCKSTORE_OBJS) test_blockstore.cpp
|
||||||
g++ $(CXXFLAGS) -o test_blockstore -ltcmalloc_minimal -luring test_blockstore.cpp $(BLOCKSTORE_OBJS)
|
g++ $(CXXFLAGS) -o test_blockstore -ltcmalloc_minimal test_blockstore.cpp $(BLOCKSTORE_OBJS) -luring
|
||||||
test_allocator: test_allocator.cpp allocator.o
|
test_allocator: test_allocator.cpp allocator.o
|
||||||
g++ $(CXXFLAGS) -o test_allocator test_allocator.cpp allocator.o
|
g++ $(CXXFLAGS) -o test_allocator test_allocator.cpp allocator.o
|
||||||
libfio_blockstore.so: fio_engine.cpp $(BLOCKSTORE_OBJS)
|
libfio_blockstore.so: fio_engine.cpp $(BLOCKSTORE_OBJS)
|
||||||
g++ $(CXXFLAGS) -ltcmalloc_minimal -shared -luring -o libfio_blockstore.so fio_engine.cpp $(BLOCKSTORE_OBJS)
|
g++ $(CXXFLAGS) -ltcmalloc_minimal -shared -o libfio_blockstore.so fio_engine.cpp $(BLOCKSTORE_OBJS) -luring
|
||||||
libfio_sec_osd.so: fio_sec_osd.cpp osd_ops.h
|
libfio_sec_osd.so: fio_sec_osd.cpp osd_ops.h
|
||||||
g++ $(CXXFLAGS) -ltcmalloc_minimal -shared -luring -o libfio_sec_osd.so fio_sec_osd.cpp
|
g++ $(CXXFLAGS) -ltcmalloc_minimal -shared -o libfio_sec_osd.so fio_sec_osd.cpp -luring
|
||||||
|
|
5
test.cpp
5
test.cpp
|
@ -23,7 +23,7 @@
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
||||||
#include "blockstore.h"
|
#include "blockstore.h"
|
||||||
#include "cpp-btree/btree_map.h"
|
#include "blockstore_impl.h"
|
||||||
|
|
||||||
static int setup_context(unsigned entries, struct io_uring *ring)
|
static int setup_context(unsigned entries, struct io_uring *ring)
|
||||||
{
|
{
|
||||||
|
@ -52,7 +52,7 @@ static void test_write(struct io_uring *ring, int fd)
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
printf("cqe failed: %d %s\n", ret, strerror(-ret));
|
printf("cqe failed: %d %s\n", ret, strerror(-ret));
|
||||||
else
|
else
|
||||||
printf("result: %d user_data: %d -> %d\n", ret, sqe->user_data, cqe->user_data);
|
printf("result: %d user_data: %lld -> %lld\n", ret, sqe->user_data, cqe->user_data);
|
||||||
io_uring_cqe_seen(ring, cqe);
|
io_uring_cqe_seen(ring, cqe);
|
||||||
free(buf);
|
free(buf);
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,6 @@ int main_vec(int argc, char *argv[])
|
||||||
for (int i = 0; i < 2048; i++)
|
for (int i = 0; i < 2048; i++)
|
||||||
{
|
{
|
||||||
int r = rand();
|
int r = rand();
|
||||||
int n = 0;
|
|
||||||
auto it = v.begin();
|
auto it = v.begin();
|
||||||
for (; it != v.end(); it++)
|
for (; it != v.end(); it++)
|
||||||
if (it->iov_len >= r)
|
if (it->iov_len >= r)
|
||||||
|
|
Loading…
Reference in New Issue