Fix qsort not being defined on Apple Clang
authorPaul Bauer <paul.bauer.q@gmail.com>
Wed, 12 Jun 2019 13:44:08 +0000 (15:44 +0200)
committerPaul Bauer <paul.bauer.q@gmail.com>
Wed, 12 Jun 2019 13:44:08 +0000 (15:44 +0200)
Change-Id: Iffcf002d44ef8f6d174886afc67d6926aa8f2faf

docs/release-notes/2019/2019.3.rst
src/gromacs/mdlib/shake.cpp

index ed08efe8d0431d9e33d0d4487f8c362b374f71f2..c5cab59b77b60298c4cb0b00a3276aea981d33b7 100644 (file)
@@ -96,6 +96,11 @@ leading to mdrun exiting with an alignment error
 
 :issue:`2952`
 
+Fixed build failure with Apple Clang
+""""""""""""""""""""""""""""""""""""
+
+Builds would fail because of qsort being undefined.
+
 Miscellaneous
 ^^^^^^^^^^^^^
 
index 8f4b9c3d0686ca9f05c82a738c9ad4ca829c28e0..79b82c8c18e2211a400ccadb03e8100043e4a135 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -225,7 +225,7 @@ make_shake_sblock_serial(shakedata *shaked,
         fprintf(debug, "Going to sort constraints\n");
     }
 
-    qsort(sb, ncons, sizeof(*sb), pcomp);
+    std::qsort(sb, ncons, sizeof(*sb), pcomp);
 
     if (debug)
     {