summaryrefslogtreecommitdiffstats
path: root/daemon/utmpd
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-03-31 20:46:22 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-03-31 20:46:22 +0800
commite755863dc764c11e2ee28daf05df6f53bf9be0f4 (patch)
treebdd2af4b2bbb01971be0438d25c8effdc344515c /daemon/utmpd
parentd1354633ba59924f118d8bae55d1a1e281629c23 (diff)
downloadpttbbs-e755863dc764c11e2ee28daf05df6f53bf9be0f4.tar
pttbbs-e755863dc764c11e2ee28daf05df6f53bf9be0f4.tar.gz
pttbbs-e755863dc764c11e2ee28daf05df6f53bf9be0f4.tar.bz2
pttbbs-e755863dc764c11e2ee28daf05df6f53bf9be0f4.tar.lz
pttbbs-e755863dc764c11e2ee28daf05df6f53bf9be0f4.tar.xz
pttbbs-e755863dc764c11e2ee28daf05df6f53bf9be0f4.tar.zst
pttbbs-e755863dc764c11e2ee28daf05df6f53bf9be0f4.zip
- (internal) enable building utmpserver
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4053 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'daemon/utmpd')
-rw-r--r--daemon/utmpd/Makefile15
-rw-r--r--daemon/utmpd/utmpserver.c4
2 files changed, 11 insertions, 8 deletions
diff --git a/daemon/utmpd/Makefile b/daemon/utmpd/Makefile
index 73d7bfc9..a6f99333 100644
--- a/daemon/utmpd/Makefile
+++ b/daemon/utmpd/Makefile
@@ -5,7 +5,10 @@ SRCROOT= ../..
PROGRAMS= utmpserver utmpsync utmpserver2 utmpserver3 authserver
UTILDIR= $(SRCROOT)/util
-UTILOBJ= $(UTILDIR)/util_stuff.o $(UTILDIR)/util_var.o $(UTILDIR)/util_cache.o $(UTILDIR)/util_passwd.o $(UTILDIR)/util_record.o
+UTILOBJ= $(UTILDIR)/util_var.o $(UTILDIR)/util_cache.o $(UTILDIR)/util_passwd.o $(UTILDIR)/util_record.o
+
+LDLIBS+= $(SRCROOT)/common/sys/libcmsys.a \
+ $(SRCROOT)/common/bbs/libcmbbs.a
all: ${PROGRAMS}
@@ -16,16 +19,16 @@ all: ${PROGRAMS}
$(CCACHE) $(CXX) $(CFLAGS) -c $*.cpp
utmpserver: utmpserver.o $(UTILOBJ)
- ${CC} ${CFLAGS} ${LDFLAGS} -o $* $*.o $(UTILOBJ)
+ ${CC} ${CFLAGS} ${LDFLAGS} -o $* $*.o $(UTILOBJ) $(LDLIBS)
utmpserver2: utmpserver2.o friend.o $(UTILOBJ)
- ${CXX} ${CFLAGS} ${LDFLAGS} -o $* $*.o $(UTILOBJ) friend.o
+ ${CXX} ${CFLAGS} ${LDFLAGS} -o $* $*.o $(UTILOBJ) friend.o $(LDLIBS)
utmpserver3: utmpserver3.o friend.o $(UTILOBJ)
- ${CXX} ${CFLAGS} ${LDFLAGS} -levent -o $* $*.o $(UTILOBJ) friend.o
+ ${CXX} ${CFLAGS} ${LDFLAGS} -levent -o $* $*.o $(UTILOBJ) friend.o $(LDLIBS)
utmpsync: utmpsync.o $(UTILOBJ)
- ${CC} ${CFLAGS} ${LDFLAGS} -o $* $*.o $(UTILOBJ)
+ ${CC} ${CFLAGS} ${LDFLAGS} -o $* $*.o $(UTILOBJ) $(LDLIBS)
authserver: authserver.o $(UTILOBJ)
- ${CC} ${CFLAGS} ${LDFLAGS} -lcrypt -levent -o $* $>
+ ${CC} ${CFLAGS} ${LDFLAGS} -lcrypt -levent -o $* $> $(LDLIBS)
clean:
rm -f *~ ${PROGRAMS} friend.o utmpserver.o utmpserver2.o utmpserver3.o utmpsync.o authserver.o
diff --git a/daemon/utmpd/utmpserver.c b/daemon/utmpd/utmpserver.c
index 85adf8c3..19005a80 100644
--- a/daemon/utmpd/utmpserver.c
+++ b/daemon/utmpd/utmpserver.c
@@ -79,10 +79,10 @@ void initdata(int index)
utmp[index].nRejects = countarray(utmp[index].reject, MAX_REJECT);
if( utmp[index].nFriends > 0 )
qsort(utmp[index].friend, utmp[index].nFriends,
- sizeof(int), qsort_intcompar);
+ sizeof(int), cmp_int);
if( utmp[index].nRejects > 0 )
qsort(utmp[index].reject, utmp[index].nRejects,
- sizeof(int), qsort_intcompar);
+ sizeof(int), cmp_int);
}
inline void syncutmp(int cfd)