Skip to content

Commit

Permalink
Moved pledge() to bsd/unistd.h
Browse files Browse the repository at this point in the history
  • Loading branch information
CobaltBSD committed Nov 9, 2023
1 parent ea612ca commit b034935
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ HDRS= base64.h \
siphash.h \
bsd/util.h \
vis.h \
pledge.h \
unveil.h \
sys/endian.h \
sys/tree.h \
Expand Down Expand Up @@ -82,10 +81,10 @@ install:
install -m755 libcobalt.so "${DESTDIR}/usr/lib"
install -m755 -d "${DESTDIR}/usr/lib/pkgconfig"
install -m644 libbsd.pc libmd.pc libcobalt.pc "${DESTDIR}/usr/lib/pkgconfig"
install -m755 -d "${DESTDIR}/usr/share/man/man2"
install -m755 -d "${DESTDIR}/usr/share/man/man3"
install -m644 radixsort.3 "${DESTDIR}/usr/share/man/man3"
install -m644 *.2 "${DESTDIR}/usr/share/man/man2"
install -m644 *.3 "${DESTDIR}/usr/share/man/man3"

$(OBJS):
$(CC) $(CFLAGS) $(LDFLAGS) -c $(basename $@).c

#TODO: man pages
2 changes: 1 addition & 1 deletion pledge.private.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef PLEDGE_LIBC_CALLS_PLEDGE_INTERNAL_H_
#define PLEDGE_LIBC_CALLS_PLEDGE_INTERNAL_H_

#include "pledge.h"
#include "promises.h"
#include <stdint.h>
#include <stddef.h>
#include <bsd/unistd.h>

#define ROUNDUP(X, K) (((X) + (K)-1) & -(K))
#define ARRAYLEN(A) \
Expand Down
2 changes: 1 addition & 1 deletion promises.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
│ PERFORMANCE OF THIS SOFTWARE. │
╚─────────────────────────────────────────────────────────────────────────────*/
#include "pledge.h"
#include <bsd/unistd.h>
#include "promises.h"

// XXX: should be inherited thread local
Expand Down

0 comments on commit b034935

Please sign in to comment.