Skip to content

Update local.c to include missing header unistd.h#25

Open
heademptyshivansh wants to merge 1 commit intodevshane:masterfrom
heademptyshivansh:patch-1
Open

Update local.c to include missing header unistd.h#25
heademptyshivansh wants to merge 1 commit intodevshane:masterfrom
heademptyshivansh:patch-1

Conversation

@heademptyshivansh
Copy link

removes the implicit declaration error on line 73

removes the implicit declaration error on line 73

#include "funcs.h"

#include <unistd.h> // this header allows us to use the getuid function(without which it declared an implicit declaration error)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think since getuid is only used when unix is defined it makes sense to do the same here:

Suggested change
#include <unistd.h> // this header allows us to use the getuid function(without which it declared an implicit declaration error)
#ifdef unix
#include <unistd.h>
#endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments