From 28d3f2d860c77844b8bfc1a2d2aaf08bc564bc71 Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 2 Aug 2019 03:25:28 +0300 Subject: [PATCH] Add OpenBSD support. GitOrigin-RevId: 80d37bf8b6e55f68f3839bf2093994015176eecb --- README.md | 2 +- tdutils/td/utils/port/config.h | 2 +- tdutils/td/utils/port/platform.h | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index eada4a5b..cd382a2b 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ TDLib (Telegram Database library) is a cross-platform library for building [Tele `TDLib` has many advantages. Notably `TDLib` is: -* **Cross-platform**: `TDLib` can be used on Android, iOS, Windows, macOS, Linux, FreeBSD, Windows Phone, WebAssembly, watchOS, tvOS, Tizen, Cygwin. It should also work on other *nix systems with or without minimal effort. +* **Cross-platform**: `TDLib` can be used on Android, iOS, Windows, macOS, Linux, FreeBSD, OpenBSD, Windows Phone, WebAssembly, watchOS, tvOS, Tizen, Cygwin. It should also work on other *nix systems with or without minimal effort. * **Multilanguage**: `TDLib` can be easily used with any programming language that is able to execute C functions. Additionally it already has native Java (using `JNI`) bindings and .NET (using `C++/CLI` and `C++/CX`) bindings. * **Easy to use**: `TDLib` takes care of all network implementation details, encryption and local data storage. * **High-performance**: in the [Telegram Bot API](https://core.telegram.org/bots/api), each `TDLib` instance handles more than 24000 active bots simultaneously. diff --git a/tdutils/td/utils/port/config.h b/tdutils/td/utils/port/config.h index e7830f04..dbdd5214 100644 --- a/tdutils/td/utils/port/config.h +++ b/tdutils/td/utils/port/config.h @@ -19,7 +19,7 @@ #if TD_LINUX || TD_ANDROID || TD_TIZEN #define TD_POLL_EPOLL 1 #define TD_EVENTFD_LINUX 1 -#elif TD_FREEBSD +#elif TD_FREEBSD || TD_OPENBSD #define TD_POLL_KQUEUE 1 #define TD_EVENTFD_BSD 1 #elif TD_CYGWIN diff --git a/tdutils/td/utils/port/platform.h b/tdutils/td/utils/port/platform.h index 6dbd3a9a..81449404 100644 --- a/tdutils/td/utils/port/platform.h +++ b/tdutils/td/utils/port/platform.h @@ -45,6 +45,8 @@ #define TD_LINUX 1 #elif defined(__FreeBSD__) #define TD_FREEBSD 1 +#elif defined(__OpenBSD__) + #define TD_OPENBSD 1 #elif defined(__CYGWIN__) #define TD_CYGWIN 1 #elif defined(__EMSCRIPTEN__)