[cs631apue] setprogname/getprogname not available on Linux

Jan Schaumann jschauma at stevens.edu
Mon Sep 21 08:37:02 EDT 2015


Yangmu Jiang <yjiang23 at stevens.edu> wrote:

> If setprogname()/getprogname() exists, they should be in <stdlib.h>,
> but google told me Linux doesn?t have such functions, they belong to
> *BSD. So, I can?t get tcp.c compiled if I follow the style guide.

On linux-lab, they are available via the libbsd library.  Unfortunately
the people who provided it there for the Linux platform did not include
the manual pages (a problem that happens a lot in Linux and more recent
software packaging).

You'd have to include bsd/stdlib.h and link against libbsd.

-Jan


More information about the cs631apue mailing list