Skip to content
/ libobsd Public

Transparent OpenBSD compatibility library and libbsd alternative

License

Notifications You must be signed in to change notification settings

guijan/libobsd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Libobsd - Transparent OpenBSD compatibility library

Libobsd is much like libbsd.

It is an attempt at writing a very similar library with more modern tools and practices to make it easy to port, maintain, and add functions to the library.

Build instructions

Libobsd depends on Meson.

Install Meson, and follow the build instructions:

foo@bar:~/libobsd$ meson setup build
foo@bar:~/libobsd$ meson compile -C build

Linux users will need to install linux-headers. The oldest supported Linux version is Linux 5.9. Older versions are missing the close_range() syscall.

Features

Libbsd compatibility mode:

foo@bar:~/libobsd$ meson configure -Dprovide_libbsd=true build

The compatibility mode installs a libbsd-overlay.pc pkg-config definition which is a symlink to libobsd.pc. It should make projects that find libbsd through pkg-config work if libobsd implements the used functions.

Meson subproject

The subproject provides libobsd and libbsd-overlay dependencies and is available in the WrapDB. As the Meson documentation describes, Meson will automatically fallback to the subproject if the dependency is not found in the system.

libbsd_dep = dependency('libbsd-overlay') # libbsd compat
libbsd_dep = dependency('libobsd')        # use libobsd exclusively

When used as a subproject, libobsd is linked statically and installs nothing. It also places a copy of the license at build/subprojects/libobsd/LICENSE_libobsd.txt. Please distribute it to comply with terms of the license. The Windows subproject depends on unix2dos from dos2unix.

Contributing

docs/CONTRIBUTING.md contains information about the design of libobsd and pointers to the documentation of the various C implementations the library has been ported to.

About

Transparent OpenBSD compatibility library and libbsd alternative

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published