diff --git a/.github/workflows/ciwheel.yml b/.github/workflows/ciwheel.yml
index 7a8c54b1861af4df4cd4657980ee1ec45e452c4b..809c978e375b1d357ea8009a5bf692b8be930911 100644
--- a/.github/workflows/ciwheel.yml
+++ b/.github/workflows/ciwheel.yml
@@ -14,7 +14,7 @@ on:
 jobs:
   get_timestamp:
     name: Prep VERSION
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04
 
     steps:
       - name: Get Arbor
@@ -35,7 +35,7 @@ jobs:
     runs-on: ${{ matrix.os }}
     strategy:
       matrix:
-        os: [ubuntu-latest, macos-latest]
+        os: [ubuntu-20.04, macos-latest]
 
     steps:
       - name: Get Arbor
@@ -62,7 +62,7 @@ jobs:
   build_sdist:
     name: Build sdist
     needs: get_timestamp
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04
 
     steps:
       - name: Get packages
@@ -94,7 +94,7 @@ jobs:
 
   upload_test_pypi:
     name: upload to test pypi
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04
     needs: [build_binary_wheels, build_sdist]
     steps:
       - uses: actions/download-artifact@v3
diff --git a/.github/workflows/spack.yml b/.github/workflows/spack.yml
index a9c5bdd8f422b55933ee53d52f0cc18af9000c69..db8aa52e7f9e80e021acc968ad82eba987510afa 100644
--- a/.github/workflows/spack.yml
+++ b/.github/workflows/spack.yml
@@ -11,7 +11,7 @@ jobs:
     runs-on: ${{ matrix.os }}
     strategy:
       matrix:
-        os: [ubuntu-20.04]
+        os: [ubuntu-22.04]
         python-version: [3.8]
     steps:
       - name: Checkout
diff --git a/arbor/hardware/memory.cpp b/arbor/hardware/memory.cpp
index f2370a68c0f37c348d78f83cd32c53b0fd0795ec..ba3fce67c4bd9a61dc8b47e55b4d986d0b51068f 100644
--- a/arbor/hardware/memory.cpp
+++ b/arbor/hardware/memory.cpp
@@ -14,9 +14,9 @@ extern "C" {
 namespace arb {
 namespace hw {
 
-#if defined(__linux__)
+#if defined(__linux__) && defined(__GLIBC__)
 memory_size_type allocated_memory() {
-#if defined(__GLIBC__) && (__GLIBC__ > 2 || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 33)))
+#if __GLIBC__ > 2 || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 33))
     auto m = mallinfo2();
 #else
     auto m = mallinfo();