summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-03-12 02:34:07 +0100
committerMattias Andrée <maandree@operamail.com>2014-03-12 02:34:07 +0100
commitec9def9775d090e2be2e2351e24d400f643a48b1 (patch)
tree05ef72eedf5a158c16091ec0293494bb1adc1ae6 /src
parentm (diff)
downloadblueshift-ec9def9775d090e2be2e2351e24d400f643a48b1.tar.gz
blueshift-ec9def9775d090e2be2e2351e24d400f643a48b1.tar.bz2
blueshift-ec9def9775d090e2be2e2351e24d400f643a48b1.tar.xz
do not use limits.h
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/blueshift_drm_c.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/blueshift_drm_c.c b/src/blueshift_drm_c.c
index 19b8e19..ce37f43 100644
--- a/src/blueshift_drm_c.c
+++ b/src/blueshift_drm_c.c
@@ -20,16 +20,11 @@
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
-#include <limits.h>
#include <alloca.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
-#ifndef PATH_MAX
- #define PATH_MAX 4096
-#endif
-
/* Requires video group */
@@ -40,8 +35,8 @@
*/
long blueshift_drm_card_count()
{
- char* pathname = alloca(PATH_MAX * sizeof(char));
long len = strlen("/dev/dri/card");
+ char* pathname = alloca((len + 21) * sizeof(char));
long count = 0;
struct stat attr;