Skip to content

Commit

Permalink
Add "-lrt" in Makefile for Solaris
Browse files Browse the repository at this point in the history
On Solaris, to use nanosleep must link the rt libraray. Below is the manual of nanosleep on Solaris:

Realtime Library Functions                         nanosleep(3RT)

NAME
     nanosleep - high resolution sleep

SYNOPSIS
     cc [ flag... ] file... -lrt [ library... ]
     #include <time.h>

     int nanosleep(const struct timespec *rqtp,  struct  timespec *rmtp);
  • Loading branch information
NanXiao committed Jul 15, 2014
1 parent 2fbb985 commit 232d779
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ifeq ($(uname_S),SunOS)
# SunOS
INSTALL=cp -pf
FINAL_CFLAGS+= -D__EXTENSIONS__ -D_XPG6
FINAL_LIBS+= -ldl -lnsl -lsocket -lpthread
FINAL_LIBS+= -ldl -lnsl -lsocket -lpthread -lrt
else
ifeq ($(uname_S),Darwin)
# Darwin (nothing to do)
Expand Down

0 comments on commit 232d779

Please sign in to comment.