--- td-1.6.0/tdutils/td/utils/port/platform.h.orig
+++ td-1.6.0/tdutils/td/utils/port/platform.h
@@ -53,6 +53,9 @@
   #define TD_CYGWIN 1
 #elif defined(__EMSCRIPTEN__)
   #define TD_EMSCRIPTEN 1
+#elif defined(__sun)
+  #define TD_SOLARIS 1
+  // TD_ILLUMOS can be already defined by C
 #elif defined(__unix__)  // all unices not caught above
   #warning "Probably unsupported Unix platform. Feel free to try to compile"
   #define TD_CYGWIN 1