Note that there are some explanatory texts on larger screens.

plurals
  1. POpread in C #define _XOPEN_SOURCE 500
    primarykey
    data
    text
    <p>I'm having some trouble getting pread() to work in a header file. Every time I compile the program, it tells me that I have an because of the statement <code>#define _XOPEN_SOURCE 500</code>. The error is:</p> <pre><code>In file included from networking.h:6, from networking.c:1: /usr/include/bsd/stdlib.h:47: error: expected ‘)’ before ‘*’ token make: *** [all] Error 1 </code></pre> <p>The headers in the header file is </p> <pre><code>#ifndef NETWORKING_H #define NETWORKING_H #define _XOPEN_SOURCE 500 #include&lt;bsd/stdlib.h&gt; #include&lt;netinet/in.h&gt; #include&lt;sys/errno.h&gt; #include&lt;sys/types.h&gt; #include&lt;sys/socket.h&gt; #include&lt;ctype.h&gt; #include&lt;fcntl.h&gt; #include&lt;limits.h&gt; #include&lt;netdb.h&gt; #include&lt;pwd.h&gt; #include&lt;stdlib.h&gt; #include&lt;stdio.h&gt; #include&lt;string.h&gt; #include&lt;unistd.h&gt; #include"html.h" </code></pre> <p>Thanks!</p> <pre><code>#ifndef LIBBSD_STDLIB_H #define LIBBSD_STDLIB_H #include &lt;sys/cdefs.h&gt; #include &lt;sys/stat.h&gt; #include &lt;stdint.h&gt; #include &lt;stdlib.h&gt; /* For compatibility with NetBSD, which defines humanize_number here. */ #include &lt;libutil.h&gt; /* FIXME: Temporary inclusions to avoid API breakage, will be removed soon. */ #include &lt;bsd/stdio.h&gt; #include &lt;bsd/unistd.h&gt; __BEGIN_DECLS u_int32_t arc4random(); void arc4random_stir(); void arc4random_addrandom(u_char *dat, int datlen); int dehumanize_number(const char *str, int64_t *size); char *getprogname (); void setprogname (char *); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload