From: Michael Vrable Date: Mon, 31 Aug 2009 18:08:25 +0000 (-0700) Subject: Link against libs3 for access to Amazon S3. X-Git-Url: https://git.vrable.net/?a=commitdiff_plain;h=6d555bf4c9e9efae66d1844347d20fbf305784fa;p=bluesky.git Link against libs3 for access to Amazon S3. libs3 is licensed as GPLv3. --- diff --git a/Makefile b/Makefile index 54aedc9..8d986f4 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +LIBS3_PATH=$(HOME)/scratch/libs3-1.4/build PACKAGES=glib-2.0 gthread-2.0 DEBUG=-g CFLAGS=-O -std=gnu99 -Wall -D_FILE_OFFSET_BITS=64 $(DEBUG) \ @@ -16,7 +17,7 @@ bluesky.a : $(OBJS) ranlib $@ bluesky : main.o bluesky.a - $(CC) $(LDFLAGS) -o $@ $^ + $(CC) $(LDFLAGS) -o $@ $^ -Wl,-rpath=$(LIBS3_PATH)/lib -L$(LIBS3_PATH)/lib -ls3 clean : rm -f $(OBJS) bluesky diff --git a/nfs3/Makefile b/nfs3/Makefile index 1a5f040..3b09716 100644 --- a/nfs3/Makefile +++ b/nfs3/Makefile @@ -1,3 +1,4 @@ +LIBS3_PATH=$(HOME)/scratch/libs3-1.4/build PACKAGES=glib-2.0 gthread-2.0 DEBUG=-g CFLAGS=-Wall -D_FILE_OFFSET_BITS=64 $(DEBUG) -I.. \ @@ -8,7 +9,7 @@ SRCS=nfsd.c rpc.c mount.c nfs3.c mount_prot_xdr.c nfs3_prot_xdr.c OBJS=$(SRCS:.c=.o) nfsproxy : $(OBJS) - $(CC) $(LDFLAGS) -o $@ $^ ../bluesky.a + $(CC) $(LDFLAGS) -o $@ $^ ../bluesky.a -Wl,-rpath=$(LIBS3_PATH)/lib -L$(LIBS3_PATH)/lib -ls3 clean : rm -f $(OBJS) nfsproxy diff --git a/nfs3/nfsd.c b/nfs3/nfsd.c index abd1050..f33a945 100644 --- a/nfs3/nfsd.c +++ b/nfs3/nfsd.c @@ -19,6 +19,7 @@ #include #include +#include "libs3.h" #include "bluesky.h" void register_rpc(); @@ -30,6 +31,8 @@ int main(int argc, char *argv[]) g_thread_init(NULL); register_rpc(); + S3_initialize(NULL, S3_INIT_ALL); + fs = bluesky_new_fs("export"); BlueSkyInode *root;