Workaround for MemorySanitizer
[alexxy/gromacs.git] / src / gromacs / gmxlib / readinp.c
index 10a2c7cc366e2932d179af5824894e3de7b2d494..ccc6ccea2b1707b361598fb73d9404f8668eaf8c 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, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, 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.
@@ -49,6 +49,7 @@
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
+#include "gromacs/utility/qsort_threadsafe.h"
 #include "gromacs/utility/smalloc.h"
 
 t_inpfile *read_inpfile(const char *fn, int *ninp,
@@ -238,7 +239,7 @@ static void sort_inp(int ninp, t_inpfile inp[])
             inp[i].count = mm++;
         }
     }
-    qsort(inp, ninp, (size_t)sizeof(inp[0]), inp_comp);
+    gmx_qsort(inp, ninp, (size_t)sizeof(inp[0]), inp_comp);
 }
 
 void write_inpfile(const char *fn, int ninp, t_inpfile inp[], gmx_bool bHaltOnUnknown,