mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-12 14:12:15 +00:00
Merge https://github.com/ycros/cgminer into cgminer
This commit is contained in:
commit
660aabf7f7
6
ocl.c
6
ocl.c
@ -32,7 +32,7 @@ extern int opt_worksize;
|
|||||||
|
|
||||||
char *file_contents(const char *filename, int *length)
|
char *file_contents(const char *filename, int *length)
|
||||||
{
|
{
|
||||||
FILE *f = fopen(filename, "r");
|
FILE *f = fopen(filename, "rb");
|
||||||
void *buffer;
|
void *buffer;
|
||||||
|
|
||||||
if (!f) {
|
if (!f) {
|
||||||
@ -385,7 +385,7 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
|
|||||||
strcat(binaryfilename, numbuf);
|
strcat(binaryfilename, numbuf);
|
||||||
strcat(binaryfilename, ".bin");
|
strcat(binaryfilename, ".bin");
|
||||||
|
|
||||||
binaryfile = fopen(binaryfilename, "r");
|
binaryfile = fopen(binaryfilename, "rb");
|
||||||
if (!binaryfile) {
|
if (!binaryfile) {
|
||||||
if (opt_debug)
|
if (opt_debug)
|
||||||
applog(LOG_DEBUG, "No binary found, generating from source");
|
applog(LOG_DEBUG, "No binary found, generating from source");
|
||||||
@ -571,7 +571,7 @@ build:
|
|||||||
free(rawsource);
|
free(rawsource);
|
||||||
|
|
||||||
/* Save the binary to be loaded next time */
|
/* Save the binary to be loaded next time */
|
||||||
binaryfile = fopen(binaryfilename, "w");
|
binaryfile = fopen(binaryfilename, "wb");
|
||||||
if (!binaryfile) {
|
if (!binaryfile) {
|
||||||
/* Not a fatal problem, just means we build it again next time */
|
/* Not a fatal problem, just means we build it again next time */
|
||||||
if (opt_debug)
|
if (opt_debug)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user