Skip to content

Commit

Permalink
fix Linux compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
ennorehling committed Sep 1, 2023
1 parent eee05ef commit 68dfdda
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
6 changes: 1 addition & 5 deletions s/build
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
ROOT=$(git rev-parse --show-toplevel)
BUILD=build
if [ -z "$JOBS" ] ; then
if [ -e /usr/sbin/sysctl ]; then
JOBS=`sysctl -n hw.ncpu`
else
JOBS=`nproc`
fi
JOBS=`nproc`
fi
DISTCC=`which distcc`
if [ ! -z "$DISTCC" ] ; then
Expand Down
9 changes: 2 additions & 7 deletions src/battle.c
Original file line number Diff line number Diff line change
Expand Up @@ -3018,11 +3018,6 @@ static void print_stats(battle * b)
}
}

static int weapon_weight(const weapon * w)
{
return w->attackskill + w->defenseskill;
}

side * get_side(battle * b, const struct unit * u)
{
side * s;
Expand Down Expand Up @@ -3092,8 +3087,8 @@ static void equip_weapons(fighter* fig)
item* itm;
unit* u = fig->unit;
int wpless = weapon_skill(NULL, u, true);
size_t w;
int p_melee = 0, p_missile = 0, i;
size_t w, i;
int p_melee = 0, p_missile = 0;

fig->weapons = NULL;
for (itm = u->items; itm; itm = itm->next) {
Expand Down
1 change: 1 addition & 0 deletions src/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

struct message;
struct selist;
struct weapon_type;
union variant;

/** more defines **/
Expand Down
1 change: 0 additions & 1 deletion src/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@

#include <assert.h>
#include <errno.h>
#include <stdarg.h>
#include <stdbool.h> // for true
#include <stdio.h> // for fprintf, stderr
#include <stdlib.h>
Expand Down

0 comments on commit 68dfdda

Please sign in to comment.