1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-09-12 14:12:15 +00:00
This commit is contained in:
Con Kolivas 2011-07-05 22:05:53 +10:00
commit 660aabf7f7

6
ocl.c
View File

@ -32,7 +32,7 @@ extern int opt_worksize;
char *file_contents(const char *filename, int *length)
{
FILE *f = fopen(filename, "r");
FILE *f = fopen(filename, "rb");
void *buffer;
if (!f) {
@ -385,7 +385,7 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
strcat(binaryfilename, numbuf);
strcat(binaryfilename, ".bin");
binaryfile = fopen(binaryfilename, "r");
binaryfile = fopen(binaryfilename, "rb");
if (!binaryfile) {
if (opt_debug)
applog(LOG_DEBUG, "No binary found, generating from source");
@ -571,7 +571,7 @@ build:
free(rawsource);
/* Save the binary to be loaded next time */
binaryfile = fopen(binaryfilename, "w");
binaryfile = fopen(binaryfilename, "wb");
if (!binaryfile) {
/* Not a fatal problem, just means we build it again next time */
if (opt_debug)