]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
docker: fixed broken musl libc + stack protector
authorMarek Vavruša <marek.vavrusa@nic.cz>
Sat, 13 Jun 2015 13:22:27 +0000 (15:22 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Sat, 13 Jun 2015 13:22:27 +0000 (15:22 +0200)
daemon/worker.c
scripts/Dockerfile

index 993f9d1ccb1cdf258bf539391c0e76ba08269d98..8b70423134ffc8b1e1bc91a85f60079329214fe6 100644 (file)
@@ -14,7 +14,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#if !defined(__APPLE__) && defined(_GNU_SOURCE)
+#if defined(__GLIBC__) && defined(_GNU_SOURCE)
 #include <malloc.h>
 #endif
 #include <uv.h>
@@ -140,7 +140,7 @@ static void qr_task_free(uv_handle_t *handle)
                array_push(worker->pools, mp_context);
        } else {
                mp_delete(mp_context);
-#if !defined(__APPLE__) && defined(_GNU_SOURCE)
+#if defined(__GLIBC__) && defined(_GNU_SOURCE)
                /* Decommit memory every once in a while */
                static int mp_delete_count = 0;
                if (++mp_delete_count == 1000) {
index 7e8a5f47a9fe85ca197793f927c5187ced872197..d62b53ff0a5632db58e25ec2859ff999b23cf6bb 100644 (file)
@@ -6,7 +6,7 @@ ENV BUILD_PKGS build-base automake autoconf libtool pkgconfig git luajit-dev lib
 ENV RUN_PKGS luajit libuv gnutls jansson bash
 ENV BUILD_IGNORE gmp nettle jansson gnutls lua libuv cmocka
 ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig
-ENV CFLAGS -O2 -g -DNDEBUG
+ENV CFLAGS -O2 -ftree-vectorize -fstack-protector -g -DNDEBUG
 ENV LDFLAGS -Wl,--as-needed
 
 # Expose port