diff --git a/debian/control b/debian/control
index 4db9d42c50126e90e3d3119ac242cdf7a2f9787a..eb432da46c0315b5e1a8b2d96c272611dd957158 100644
--- a/debian/control
+++ b/debian/control
@@ -5,6 +5,7 @@ Maintainer: Simon McVittie <smcv@collabora.com>
 Standards-Version: 4.4.0
 Build-Depends:
  debhelper (>= 9),
+ g++ (>= 4:4.8) | g++-4.8,
  libglib2.0-dev,
  libsteam-runtime-tools-0-dev (>= 0.20190926.0~),
  libxau-dev,
diff --git a/debian/gitlab-ci.yml b/debian/gitlab-ci.yml
index ac6ce36c75925cebb4e5835fd1fb90a0d6c0817b..889471f255d95d54a777a1f319cb57d15290bb72 100644
--- a/debian/gitlab-ci.yml
+++ b/debian/gitlab-ci.yml
@@ -131,6 +131,9 @@ build:scout:
               ${NULL+}
             fi
 
+            # g++ 4.6 is too old for the submodule (see also debian/rules)
+            export CXX=g++-4.8
+
             meson \
               --prefix="$(pwd)/_build/prefix" \
               -Dsrcdir=src \
diff --git a/debian/rules b/debian/rules
index e5c89d9ff9ff4a524f0991354415edd9363435b4..20f722eaf75dc4ec912b2737c62a7f5b77ae69dc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,6 +7,10 @@ export LC_ALL=C.UTF-8
 
 include /usr/share/dpkg/default.mk
 
+ifeq ($(shell dpkg --compare-versions `c++ -dumpversion || echo 0` ge 4.8 || echo old),old)
+export CXX = g++-4.8
+endif
+
 meson_options =
 
 ifeq ($(DEB_DISTRIBUTION),UNRELEASED)
diff --git a/meson.build b/meson.build
index c01943700924a4e0633e58a6dbde38500df81654..4ae11f0328e33c2ccafa4e3cca6040b7251989ff 100644
--- a/meson.build
+++ b/meson.build
@@ -24,6 +24,8 @@
 project(
   'pressure-vessel', 'c',
   default_options: [
+    'c_std=c99',
+    'cpp_std=c++11',
     'warning_level=2',
   ],
 )