[OpenIndiana-discuss] How to run Flash Player plugin in OI Hipster

Udo Grabowski (IMK) udo.grabowski at kit.edu
Tue Jan 19 13:30:09 UTC 2016


On 19/01/2016 14:04, Predrag Zečević - Unix Systems Administrator wrote:
>
> On 01/19/16 01:56 PM, Paolo Marcheschi wrote:
>> Hi
>>
>> Thank you this is a great achievement.
>>
>> I tried to compile myself the 2.c but I cannot Is it the code right?
>> static int (*real_ioctl)(int fildes, int request, /* arg */ …) = 0;
>>

This is an entry for varying number of arguments , ... (the webpage
code contains a single three-dot symbol there, see below).

>
> Hi,
>
> latest version (from http://www.adobe.com/software/flash/about/):
>
> Solaris     Flash Player 11.2.202.223 is the last supported Flash Player version
> for Solaris.
>
> Regards.
>
> P.S. I have tried to get source and compile it, but it is somehow scrambled -
> compilation has failed.

Use this code, the webpage code has several unusual symbols

#include <stdio.h>
#include <sys/types.h>
#include <stdarg.h>
#include <dlfcn.h>
typedef struct cpuid_get_hwcap_old {
char *cgh_archname;
uint_t cgh_hwcap;
} *s_cpuid_get_hwcap_old;

static int (*real_ioctl)(int fildes, int request, /* arg */ ...) = 0;

int ioctl(int fildes, int request, /* arg */ ...){
va_list args;
va_start(args, request);
s_cpuid_get_hwcap_old ps = va_arg(args, s_cpuid_get_hwcap_old);
va_end(args);
if (request==(('c'<<24)|('i'<<16)|('d'<<8 )|0) ){
ps->cgh_hwcap = 0x40435c6f;
printf("123\nps=%s\n", ps->cgh_archname);
return 0;
}
if(!real_ioctl)
real_ioctl = dlsym(RTLD_NEXT, "ioctl");

asm("addl    $36, %%esp\n\t"
"popl    %%ebx\n\t"
"popl    %%ebp\n\t"
"movl %0, %%eax\n\t"
"jmp *%%eax":: "r"(real_ioctl));

return -1;
}

-- 
Dr.Udo Grabowski   Inst.f.Meteorology & Climate Research IMK-ASF-SAT
http://www.imk-asf.kit.edu/english/sat.php
KIT - Karlsruhe Institute of Technology           http://www.kit.edu
Postfach 3640,76021 Karlsruhe,Germany T:(+49)721 608-26026 F:-926026



More information about the openindiana-discuss mailing list