Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Running Mac OS 10.7.2 and trying to run libfaketime and nothing happen. I installed and ran exactly as directed only the time and date stay exactly as are set in the system? Is anyone else able to successfully run this on OSX?

$ date
Mon Jan 30 21:05:09 CST 2012
$ LD_PRELOAD=./libfaketime.so.1 FAKETIME="-15d" date
Mon Jan 30 21:05:32 CST 2012
share|improve this question
1  
Did you read github.com/wolfcw/libfaketime/blob/master/README.OSX ? (That's directly linked from libfaketime's front page.) –  Mat Jan 31 '12 at 6:17
add comment

1 Answer

up vote 2 down vote accepted

Use DYLD_INSERT_LIBRARIES instead of LD_PRELOAD on Mac OS. You may need to set DYLD_FORCE_FLAT_NAMESPACE as well. E.g.

DYLD_INSERT_LIBRARIES=./libfaketime.so.1 DYLD_FORCE_FLAT_NAMESPACE=y FAKETIME="-15d" date
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.