mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:57:35 +00:00
LibC+LibDl: Declare functions taking no arguments as taking void
In C++, a function declaration with an empty parameter list means that the function takes no arguments. In C, however, it means that the function takes an unspecified number of parameters. What we did previously was therefore non-conforming. This caused a config check to fail in the curl port, as it was able to redeclare `rand` as taking an int parameter.
This commit is contained in:
parent
a221596614
commit
b9c753f6f9
16 changed files with 56 additions and 56 deletions
|
@ -30,11 +30,11 @@ struct servent {
|
|||
char* s_proto;
|
||||
};
|
||||
|
||||
struct servent* getservent();
|
||||
struct servent* getservent(void);
|
||||
struct servent* getservbyname(const char* name, const char* protocol);
|
||||
struct servent* getservbyport(int port, const char* protocol);
|
||||
void setservent(int stay_open);
|
||||
void endservent();
|
||||
void endservent(void);
|
||||
|
||||
struct protoent {
|
||||
char* p_name;
|
||||
|
@ -42,10 +42,10 @@ struct protoent {
|
|||
int p_proto;
|
||||
};
|
||||
|
||||
void endprotoent();
|
||||
void endprotoent(void);
|
||||
struct protoent* getprotobyname(const char* name);
|
||||
struct protoent* getprotobynumber(int proto);
|
||||
struct protoent* getprotoent();
|
||||
struct protoent* getprotoent(void);
|
||||
void setprotoent(int stay_open);
|
||||
|
||||
extern int h_errno;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue