Browse Source

Merge pull request #203 from sterlingpickens/master

Silence build warning, fix code typo.
djm34
Noel Maersk 11 years ago
parent
commit
f3df639ad4
  1. 21
      configure.ac
  2. 2
      driver-opencl.c
  3. 2
      sgminer.c

21
configure.ac

@ -295,12 +295,21 @@ fi @@ -295,12 +295,21 @@ fi
AM_CONDITIONAL(USE_GIT_VERSION, [test x$usegitver = xyes])
#check execv signature
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include <process.h>
int execv(const char*, char *const*);
])],
AC_DEFINE([EXECV_2ND_ARG_TYPE], [char* const*], [int execv(const char*, char*const*);]),
AC_DEFINE([EXECV_2ND_ARG_TYPE], [const char* const*], [int execv(const char*, const char*const*);]))
if test "x$have_linux" == xtrue; then
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include <unistd.h>
int execv(const char*, char *const*);
])],
AC_DEFINE([EXECV_2ND_ARG_TYPE], [char* const*], [int execv(const char*, char*const*);]),
AC_DEFINE([EXECV_2ND_ARG_TYPE], [const char* const*], [int execv(const char*, const char*const*);]))
else
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include <process.h>
int execv(const char*, char *const*);
])],
AC_DEFINE([EXECV_2ND_ARG_TYPE], [char* const*], [int execv(const char*, char*const*);]),
AC_DEFINE([EXECV_2ND_ARG_TYPE], [const char* const*], [int execv(const char*, const char*const*);]))
fi
dnl CCAN wants to know a lot of vars.
# All the configuration checks. Regrettably, the __attribute__ checks will

2
driver-opencl.c

@ -854,7 +854,7 @@ retry: // TODO: refactor @@ -854,7 +854,7 @@ retry: // TODO: refactor
cgsem_post(&thr->sem);
}
goto retry;
} if (!strncasecmp(&input, "d", 1)) {
} else if (!strncasecmp(&input, "d", 1)) {
if (selected)
selected = curses_int("Select GPU to disable");
if (selected < 0 || selected >= nDevs) {

2
sgminer.c

@ -7941,7 +7941,7 @@ int main(int argc, char *argv[]) @@ -7941,7 +7941,7 @@ int main(int argc, char *argv[])
quithere(1, "Failed to pthread_mutex_init lockstat_lock errno=%d", errno);
#endif
initial_args = (const char **)malloc(sizeof(char *)* (argc + 1));
initial_args = (char **)malloc(sizeof(char *)* (argc + 1));
for (i = 0; i < argc; i++)
initial_args[i] = strdup(argv[i]);
initial_args[argc] = NULL;

Loading…
Cancel
Save