Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

fix build for macOS #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 9pfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
enum
{
CACHECTLSIZE = 8, /* sizeof("cleared\n") - 1 */
MSIZE = 8192
MSIZE_9P = 8192
Copy link
Author

Choose a reason for hiding this comment

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

MSIZE conflicts with the macOS standard library.

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/param.h
104:#define MSIZESHIFT      8                       /* 256 */
105:#define MSIZE           (1 << MSIZESHIFT)       /* size of an mbuf */

};

void dir2stat(struct stat*, Dir*);
Expand Down Expand Up @@ -505,7 +505,7 @@ main(int argc, char *argv[])
freeaddrinfo(ainfo);

init9p();
msize = _9pversion(MSIZE);
msize = _9pversion(MSIZE_9P);
if(doauth){
authfid = _9pauth(AUTHFID, user, NULL);
ai = auth_proxy(authfid, auth_getkey, "proto=p9any role=client");
Expand Down
4 changes: 4 additions & 0 deletions libc.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ typedef unsigned char uchar;
typedef unsigned long long uvlong;
typedef long long vlong;

#ifndef __GLIBC__
typedef unsigned long ulong;
Copy link
Author

Choose a reason for hiding this comment

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

ulong is specific to glibc.

#endif

typedef
struct Qid
{
Expand Down