deadpixi / sam

An updated version of the sam text editor.
Other
433 stars 47 forks source link

canlocksocket is missing an arg for open #71

Closed atsampson closed 6 years ago

atsampson commented 6 years ago

canlocksocket calls open with O_CREAT, but it doesn't specify a mode argument: https://github.com/deadpixi/sam/blob/f4a588482ea8cb5f366c5cfa964852a7cbff8895/sam/io.c#L325

POSIX says that open will expect the argument to be present when O_CREAT is used, and current glibc does some macro magic to cause a compilation error if it's missing. Adding a mode argument fixes it.

deadpixi commented 6 years ago

Yep, I'm an idiot. Fixed.